I have the following code that for some reason wont display a map or render the points in the map. Help please
<!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> <title>Command</title> <link rel="stylesheet" href="css/style.css" media="screen" type="text/css" /> <script src="http://maps.google.com/maps? file=api&v=1&key=ABQIAAAA4bDduUwtw5nW-0zAIaVU3hQ7wIIw_0KRhLBNd0z7PoGspSVY1hRrVx21IIdv8CAlpI8XXWRgLQaxdw" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ function load(){ var map = new GMap2(document.getElementById("map")); var point = new GPoint(); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); var baseIcon = new GIcon(); baseIcon.shadow = "http://www.google.com/mapfiles/ shadow50.png"; baseIcon.iconSize = new GSize(20, 34); baseIcon.shadowSize = new GSize(37, 34); baseIcon.iconAnchor = new GPoint(9, 34); baseIcon.infoWindowAnchor = new GPoint(9, 2); baseIcon.infoShadowAnchor = new GPoint(18, 25); function createMarker(point, iconname, info) { var icon = new GIcon(baseIcon); icon.image = iconname.getAttribute("image"); var marker = new GMarker(point, icon); GEvent.addListener(marker, "click", function(){ marker.openInfoWindowXslt(info, "agis.xsl"); }); return marker; } var request = GXmlHttp.create(); request.open("GET", "agis_render.xml", true); request.onreadystatechange = function() { if (request.readyState == 4) { var xmlDoc = request.responseXML; var points = xmlDoc.documentElement.getElementsByTagName("point"); var icons = xmlDoc.documentElement.getElementsByTagName("icon"); var info = xmlDoc.documentElement.getElementsByTagName("info"); for (var i = 0; i < points.length; i++) { var point = new GPoint(parseFloat(points[i].getAttribute("lng")), parseFloat(points[i].getAttribute("lat"))); var marker = createMarker(point, icons[i], info[i]); map.addOverlay(marker); } } } request.send(null); map.centerAndZoom(point[1], 10); } //]]> </script> </head> <body onload="load()"> <div id="header"> <h1><strong>Command</strong> GPS System Analysis</h1> <div>Command <strong>API</strong> Implementation</div> </div><!-- header --> <div id="container"> <div id="map"></div> <div id="loadstatus"> <div id="information"> <strong>Loading...........</strong> </div><!-- information --> <div id="progress"></div> </div><!-- LoadStatus --> <div id="sideBar"> <h2>Options</h2> <ul> <li>System Options goes here</li> </ul> <form id="checkpoints" method="post" action="index.php"> <fieldset> <legend>Legend</lengend> <p>Legend will be here for the map</p> </fieldset> <a id="showStats" class="button">Detials</a> <a id="hideStats" class="button">Map</a> </form> </div><!-- Sidebar --> <div id="stats"> <p> Unit and Detail information will go here</p> </div><!-- stats --> </div><!-- Container --> </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 -~----------~----~----~----~------~----~------~--~---
