google-maps-markers

Customize marker of myLocation Google Maps v2 Android

本小妞迷上赌 提交于 2019-12-01 10:33:06
I'm developing an android application that uses google maps v2. But i have a problem. I want to customize blue dot point(marker) of myLocation that google map gives us. Somebody can tell me how to customize this?? I want to change blue marker for an image and put a info window associated to marker. Thanks. Regards. As of version 3.1.36 of the API v2, the blue dot cannot be changed. I suggest not enabling the blue dot and instead using LocationClient and the location data to display normal Marker (optionally with a Circle for accuracy). Every time you get a Location object, just update Marker

Finding intermediate Lattitude Longitude between two given points

蹲街弑〆低调 提交于 2019-12-01 09:56:09
问题 I am provided with this information - Lat-Long of source Lat-Long of destination I need to find the Lat-Long pairs on the path from source to destination. These Lat-Long pairs must differ from each other by some given granularity. Is there some Google API using which I can get this information ? 回答1: The Google Maps API Elevation Service does exactly that. Given a path (defined by your source and destination LatLng pair), you also specify the number of samples and it will return elevation for

Making a Google Maps marker show a specific div when clicked

感情迁移 提交于 2019-12-01 09:22:47
问题 I'm pretty new to javascript and I'm learning as I go along, so sorry if this is simple. What I have is a bunch of markers displaying on the map, these are loaded from an array and displayed with a function. What I want to do is make a specific div pop up which is related to the marker that was clicked on. When another marker is clicked, that previous div closes and the new div opens up. This is what I have so far, to get a concept of what I'm doing. I imagine I would want to write a function

Google Maps v3 map.getBounds().containsLatLng is not a function

怎甘沉沦 提交于 2019-12-01 08:44:55
How do i set the "setMap" function here to port this code to v3? Or port it generally to v3... // map recenter, if element is outside the mapscreen while ((!map.getBounds().containsLatLng(marker.getPosition())) & (showAllCategoryElements == 0)) { var newCenterPointLng = (map.getBounds().getCenter().lng() + marker.getPosition().lng()) / 2; var newCenterPointLat = (map.getBounds().getCenter().lat() + marker.getPosition().lat()) / 2; map.panTo(new google.maps.LatLng(newCenterPointLat, newCenterPointLng)); map.setCenter(new google.maps.LatLng(newCenterPointLat, newCenterPointLng)); if (!map

removing default mouseover tooltip from marker in google-maps

本秂侑毒 提交于 2019-12-01 08:37:05
I have created an application for showing an Information Window popup for markers, The application is working fine and the popup is showing correctly but the only solution is that along with the custom Information Window popup when under mouse-over, default popup with html tag is showing like as shown below. JSFiddle Can anyone please tell me some solution for this My code is as given below var infowindow = new google.maps.InfoWindow(); function point(name, lat, long) { var self = this; self.name = name; var marker = new google.maps.Marker({ position: new google.maps.LatLng(lat, long), title:

How to manage click on marker which is not in Cluster in Android Google Map API?

五迷三道 提交于 2019-12-01 08:20:59
问题 I am having trouble implementing OnClickListener for Marker(s) which are not in Cluster, i.e. not added using: mClusterManager.addItem(markerCluster); I have set OnMarkerClickLister as follows: mMap.setOnCameraIdleListener(mClusterManager); mMap.setOnMarkerClickListener(mClusterManager); If I just use: mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() { @Override public boolean onMarkerClick(Marker marker) { return false; } }); the click on markers is not working at all. For

Remove one of many markers on Google maps with javascript

梦想与她 提交于 2019-12-01 08:10:19
I currently add markers to the map using the code below. I'd like to be able to remove any one at any time by pushing a javascript command. Is this possible? ex. place 5 markers.. removed the 3rd one while keeping the other 4. $('#map').show(); var geocoder = new google.maps.Geocoder(); var address = document.getElementById("address").value +", " + document.getElementById("city").value; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var lat = results[0].geometry.location.lat(); var lng = results[0].geometry.location.lng();

Customize marker of myLocation Google Maps v2 Android

对着背影说爱祢 提交于 2019-12-01 07:54:16
问题 I'm developing an android application that uses google maps v2. But i have a problem. I want to customize blue dot point(marker) of myLocation that google map gives us. Somebody can tell me how to customize this?? I want to change blue marker for an image and put a info window associated to marker. Thanks. Regards. 回答1: As of version 3.1.36 of the API v2, the blue dot cannot be changed. I suggest not enabling the blue dot and instead using LocationClient and the location data to display

Android tap on map and get coordinates

﹥>﹥吖頭↗ 提交于 2019-12-01 06:45:44
Hi guys I am trying to make an app that once the user taps on a map it gets the coordinates of that specific point. Among others i have also read that: Get coordinates on tapping map in android It seems like the most relevant post but what I want to do is to be able to tap anywhere on the map not on an marker/overlay item. In fact I want to create a marker in that specific point that the user tapped and get the coordinates of it. Is that possible? Thanks Mike CommonsWare Yes. In fact, the answer I gave in that other question is what you need. Should be trivial with a little bit of math. You

Remove one of many markers on Google maps with javascript

主宰稳场 提交于 2019-12-01 06:20:28
问题 I currently add markers to the map using the code below. I'd like to be able to remove any one at any time by pushing a javascript command. Is this possible? ex. place 5 markers.. removed the 3rd one while keeping the other 4. $('#map').show(); var geocoder = new google.maps.Geocoder(); var address = document.getElementById("address").value +", " + document.getElementById("city").value; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps