Hi there, I'm newbie in google map, and I'm trying to represent markers from xml files. I was ok about it but sometimes some markers are overlapped. For me it's not important to have a sidebar, but only ESA's "go behing" function. I read the guide and I would like to apply that code so that visited markers were thrown behind others.
I cannot insert the code into mine. Could someone give me a hand? I attach my code. thank you for the fantastic forum, I learnt a lot from you. ciao map.html (data are from pts.xml file) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>example</title> <script src="http://maps.google.com/maps?file=api&v=2 &key=ABQIAAAArSysGIurcK7dOMZla-7TExQSXE4ITa1YzwIbIoQt- CisjCLm8xS2jytkVj9gPuB1NWF-zZMCsCPqMA" type="text/javascript"> </script> <script type="text/javascript"> function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setUIToDefault(); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(43.6, 10.9), 10); GDownloadUrl("pts.xml", function(data, responseCode) { var xml = GXml.parse(data); var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("long"))); var data = markers[i].getAttribute("data"); var indirizzo = markers[i].getAttribute("indirizzo"); var marker = createMarker(point, data, indirizzo); map.addOverlay(marker); } }); } } function createMarker(point, data, indirizzo) { var marker = new GMarker(point); GEvent.addListener(marker, 'mouseover', function() { marker.openInfoWindowHtml(data+"<br/>"+indirizzo); }); return marker; } </script> </head> <body onload="initialize()" onunload="GUnload()"> <div id="map_canvas" style="width: 800px; height: 600px"></div> </body> </html> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
