Hi, searching for hours now... I got it working some weeks ago, but somehow I can't get to show my markers...
<!DOCTYPE html "-//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>Google Maps JavaScript API Example</title> <script src="http://maps.google.com/maps? file=api&v=2&key=ABQIAAAAovKdKZ2fOvVJOQtR-4TiJxSlzLpaB4nRpWS-8XBxvjg7gYx_3xSMv1CM7OEElwWtqfQz6quhZV9e5w" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.setCenter(new GLatLng(51.5, 7), 8); GDownloadUrl("/getlocations.php", function(data) { var xml = GXml.parse(data); var markers = xml.documentElement.getElementsByTagName ("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("name"); var typ = markers[i].getAttribute("typ"); var adresse1 = markers[i].getAttribute("adresse1"); var adresse2 = markers[i].getAttribute("adresse2"); var webseite = markers[i].getAttribute("webseite"); var email = markers[i].getAttribute("email"); var telefon = markers[i].getAttribute("telefon"); var zeiten = markers[i].getAttribute("zeiten"); var beschreibung = markers[i].getAttribute("beschreibung"); var point = new GLatLng(parseFloat(markers[i].getAttribute ("lat")), parseFloat(markers[i].getAttribute ("lng"))); var marker = createMarker(point, name, typ, adresse1, adresse2, webseite, email, telefon, zeiten, beschreibung); map.addOverlay(marker); } }); } } var iconDiskothek = new GIcon(); iconDiskothek.image = '/markers/drinks.png'; iconDiskothek.shadow = '/markers/shadow.png'; iconDiskothek.iconSize = new GSize(12, 20); iconDiskothek.shadowSize = new GSize(22, 20); iconDiskothek.iconAnchor = new GPoint(6, 20); iconDiskothek.infoWindowAnchor = new GPoint(5, 1); var iconHotel = new GIcon(); iconHotel.image = '/markers/drinks.png'; iconHotel.shadow = '/markers/shadow.png'; iconHotel.iconSize = new GSize(12, 20); iconHotel.shadowSize = new GSize(22, 20); iconHotel.iconAnchor = new GPoint(6, 20); iconHotel.infoWindowAnchor = new GPoint(5, 1); var customIcons = []; customIcons["Diskothek"] = iconDiskothek; customIcons["Hotel"] = iconHotel; function createMarker(point, name, typ, adresse1, adresse2, webseite, email, telefon, zeiten, beschreibung) { var marker = new GMarker(point, customIcons[typ]); var html = "<font face=\"Arial\"><b>" + name + "</b> <br/>" + adresse1 + "<br/>" + adresse2 + "<br /><br />" + "<a href=\"" + webseite + "\" target=\"_parent\">Zur Webseite</a></font>"; GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(html); }); return marker; } </script> </head> <body onload="initialize()" onunload="GUnload()"> <div id="map" style="width: 500px; height: 300px"></div> </body> </html> URL: http://wasgehtabinnrw.de/locations2 Any ideas? Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
