google-maps-markers

how to add numbering on each markers in Google maps v3?

谁都会走 提交于 2019-12-05 20:53:28
I want to ask you all about how to add number dynamically on each markers in Google Maps v3 with JavaScript. For example, the first marker is 1, the second one is 2, etc. In this case I have position data like this : [ new google.maps.LatLng(1.3667, 103.8000), new google.maps.LatLng(1.3667, 103.8000), new google.maps.LatLng(1.3667, 103.8000), new google.maps.LatLng(1.3667, 103.8000), new google.maps.LatLng(51.0000, 9.0000), new google.maps.LatLng(51.0000, 9.0000), new google.maps.LatLng(51.5142, -0.0931), new google.maps.LatLng(51.5142, -0.0931), new google.maps.LatLng(54.0000, -2.0000), new

Put marker from Google Maps v3 in front of all others

☆樱花仙子☆ 提交于 2019-12-05 18:02:09
问题 Can somebody help me put the current location in front of all others? I have read about MAX_ZINDEX and setZindex() but I cannot understand it. This is my code: var latlng = new google.maps.LatLng(lat,lng); var image = ""; var currentplace = "Ohla Hotel"; var zInd = ""; if( name == currentplace ) { image = "../img/hotel_icon.png"; } else { image = "../img/home_icon.png"; } //alert(); var maxZindex = google.maps.Marker.MAX_ZINDEX; if( name == currentplace ) { zInd = (maxZindex + 1); } var

Google Maps v2: how to display various markers with the same coordinates

痞子三分冷 提交于 2019-12-05 15:07:46
I'm using Google Maps JavaScript API V2 to mark locations saved in an array. Markers with different coordinates are displayed well, but I have no idea how to display various markers with the same coordinates. I need it because an array of locations can have the same coordinates, but with a different description. What is the way to display those different descriptions? The code where markers are added is: var map; function loadEarth(mapdiv) { if (GBrowserIsCompatible()) { if(!mapdiv) return true; map=new GMap2(document.getElementById("map")); map.enableDoubleClickZoom(); map

Can I use my own custom animated gifs as markers on Google Maps API?

a 夏天 提交于 2019-12-05 14:51:03
I want to use different animated cartoon images (gifs) as markers on Google Maps; can I do this with the API? Yes you can Live Example ): var position = new google.maps.LatLng(59.219521,15.1419873); var marker; var map; function initialize() { var mapOptions = { zoom: 16, mapTypeId: google.maps.MapTypeId.ROADMAP, center: position }; map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); marker = new google.maps.Marker({ map:map, draggable:false, animation: google.maps.Animation.DROP, position: position, icon: "http://heera.it/wp-content/themes/heerait/img/blog/me.png" })

set zoom level when marker is removed

送分小仙女□ 提交于 2019-12-05 13:15:09
using javascript google-maps api I currently have it setup to remove a maker I set it up when I am adding a location like so function addLocation(map,location) { var point = new GLatLng(location.lat, location.lon); var marker = new GMarker(point); map.addOverlay(marker); bounds.extend(marker.getPoint()); $('<a href="#" class="closebutton">').click(function(e){ e.preventDefault(); $(this).parent().remove(); map.removeOverlay(marker); map.closeInfoWindow(); }).prependTo($('<li>'+location.label+'</li>').click(function() { showMessage(marker, location.label,map); }).appendTo("#list")); GEvent

How to apply animations to GMSMarker

浪尽此生 提交于 2019-12-05 12:29:51
I’m changing my app by migrating iOS maps to google maps using Google Maps SDK for iOS V1.1.0 and I’m trying to animate the markers while adding/removing but I didn’t find any suggestions in the documentation related to this, Please suggest me how to perform the animations on GMSMarkers Amozoss In the GMSMarker Class Reference , it says, for the appearAnimation property: Controls the animation used when this marker is placed on a GMSMapView (default kGMSMarkerAnimationNone , no animation). Using the Google Maps SDK for iOS , a marker can be made like this: GMSMarker *startMarker = [GMSMarker

How to customize the InfoWindow of google map iOS SDK?

心不动则不痛 提交于 2019-12-05 07:29:11
问题 I want to change the width of the InfoWindow of google map iOS SDK. Is there anyway to do? The reason I want to do it is to show the full address in the InfoWindow. Is there any other way to do so instead of customizing the InfoWindow? Also, can I change the text size in the InfoWindow? At least, I would like to achieve the effect like this map: http://www.google.com/about/company/facts/locations/ where hyperlink can be applied as well. 回答1: Set the map delegate to the view controller, then

Pie charts clustering on Google Maps [batchgeo-like]

青春壹個敷衍的年華 提交于 2019-12-05 07:21:28
问题 Anybody knows how to remake something similar to what Batchgeo does when clusters/groups markers with dynamic pie charts? Example: batchgeo map with pie clustering Thanks, Regards 回答1: I don't have a full how to for you, but do have some pointers which might help you and appear to be used by BatchGeo. I would study the cluster example on Google maps: https://developers.google.com/maps/articles/toomanymarkers Which covers clustering pretty well... then you would need to look at changing the

Google Maps Over Query Limit but have Long and Lat

泄露秘密 提交于 2019-12-05 07:08:35
问题 I have the coordinates (Long & Lat) that I'm having PHP insert all of them but I don't know how to change the javascript to correct the over query limit error. here is the code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title></title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="markerclusterer.js"></script> <script type="text/javascript"> var map; //marker clusterer var mc; var mcOptions =

Google Maps marker cut in half internet explorer

泄露秘密 提交于 2019-12-05 06:36:52
I'm having a weird problem with my google maps marker icons in internet explorer. All my markers are showing up cut in half doubled and shifted over 50 %. that is using the demo code from google. So it must be something weird i'm doing elsewhere with styles or jquery, but i don't know what. Has anyone had this problem before? djsm I had a similar issue. The problem being that each marker icon inherited a margin>0, I solved the issue by setting the margin to zero for all img in the map div. <style type="text/css"> #map_canvas img { margin: 0px } </style> Your problem is interesting, in that it