google-maps-markers

How to implement live tracking?

泪湿孤枕 提交于 2019-12-23 03:26:46
问题 I would like implement a live tracking in Android using Google maps. I want to show the user's movement as they move from one location to another by changing the position of the marker on the map. 回答1: Because the user location changes, you must account for movement by re-estimating user location every so often. read the full story here: https://developer.android.com/guide/topics/location/strategies.html 回答2: you need to make LocationRequest after a fix interval and listen to location change

Android - How to show nearby user markers?

北城以北 提交于 2019-12-23 02:50:54
问题 I have an android app where users can register and when they are logged in their location is visible by markers on the map as shown in this Image. But I just want to show only nearby marker within 100 meters. Please help me up with exact coding section and all the object initialization. Here is my code for fetching all user markers(lat,lng) from database: private void getNearbyMarkers(){ geoFireRef.addValueEventListener(new ValueEventListener() { @Override public void onDataChange

Map Marker Management, Android

醉酒当歌 提交于 2019-12-23 02:36:26
问题 I have a map that dispays markers. If the user clicks on a marker a popup shows up. A method calculates wheather there is a marker at the clicked position. My Problem is that I have a lot of different markers, but in this method I can handle only one specific marker. I need something like a general bitmap, that holds all marker resources. E.g. I do not wand to handle 100 markers manually, because all are a Bitmap so I need just to handle one general bitmap. any ideas? 回答1: I have solved my

Recalculate markercluster onclick of filter

孤街浪徒 提交于 2019-12-23 01:58:05
问题 JS FIDDLE HERE: http://jsfiddle.net/useyourillusiontoo/g77np63c/1/ I've created a google map that plants markers down and allows my to filter then with checkboxes without the page or map reloading. Yay! Next I added marker cluster which worked too. However, when I now click on my markers the cluster doesn't update. That is.. the number inside the cluster doesnt change to reflect markers that are being hidden/displayed. When I zoom in the markers are still being hidden/displayed but its just

How to get geographical coordinates in google maps API V2 android using an string address?

二次信任 提交于 2019-12-23 01:57:18
问题 I´m designing an android app that locate places, these places are in a database in a server but I only have the name and location of the place, so I need to locate it in my app and put a marker there. It's posible to get coordinates only with address or, Do I need to redo my database adding fields with latitude and longitude? 回答1: You can use the Geocoder class to do a look-up of the addresses you have, and then populate the map with Markers using the LanLng objects that are returned. Note

Set marker icon on Google Maps v2 Android from URL

烂漫一生 提交于 2019-12-22 18:46:37
问题 I am unable to add the icon provided by the Google Places API to the marker. For example, I would like to have the icon returned from the JSON of Google Places API: "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png" Here's how I am doing it now without adding the icon: for (Place place : mNearPlaces.results) { LatLng placeLatLng = new LatLng(place.geometry.location.lat, map.addMarker(new MarkerOptions() .position(placeLatLng) .title(place.name)); } I looked at

Polymer, how to open/close google-map-marker InfoWindow?

寵の児 提交于 2019-12-22 12:41:56
问题 I'm using the webcomponent google-map-marker in a Polymer element created by me. I want to catch the click on it to do something afterwords in my component, so I tried this on my template: <div horizontal layout flex style="height: 400px;"> <div class="panel-contents" vertical layout flex> <google-map flex map="{{map1}}" latitude="45.5601451" longitude="-73.7120832"> <google-map-marker latitude="45.5601451" longitude="-73.7120832" map="{{map1}}" clickEvents="true" google-map-marker-click="{

Adding thousands of Markers Google Map API V3

梦想与她 提交于 2019-12-22 09:50:16
问题 I am currently putting together a demo application that needs to show 28,000 markers on a map without using any type of clustering. The problem is, adding the marker to the map for that many takes so long that the browser crashes! Here is the current process -Retrieves map points from database including LAT and LONG (doesn't have to geocode) - for loop cycles through each of the returned values and does this: var marker = new google.maps.Marker({ position: point, animation: google.maps

Updating a map marker in android

女生的网名这么多〃 提交于 2019-12-22 04:17:10
问题 Using Google Maps Android API v2, I can update my marker's position by getting the Marker from a hashMap and then calling: Marker marker = hashMap.get(someId); marker.setTitle("Title"); marker.setSnippet("Snippet"); marker.setPosition(new LatLng(newLatitude, newLongitude)); However, if the marker is selected when this is called, the title and snippet will only update if I click off the marker and reselect it. Is there anyway to tell the map to refresh the data in the marker bubble? 回答1: Call

Changing z-index (z-order) of map marker for Maps V2 in Android

旧街凉风 提交于 2019-12-22 03:28:20
问题 I have several markers shown on my map that are either close to each other or even over top of one another. I need to have one specific marker always on top. It doesn't matter if I add the marker to the map first or last, it often ends up being placed behind some markers. For some mysterious reason, Google Maps determines this. It needs to work with Google Maps for Android V2. 回答1: The June 27th, 2016 release, v9.2.0, of Android Maps API v2 now supports a z-index - see announcement at https:/