Hey I'm trying to use a repeater control in asp.net which draws its data from a database to setup the markers on my map, heres the code after its compiled:
<script src="http://maps.google.com/maps? file=api&v=2&key=abcdefg&sensor=false" type="text/javascript"></script> <script type="text/javascript"> function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.removeMapType(G_HYBRID_MAP); map.setCenter(new GLatLng(54.2652,-3.7793), 5); map.addControl(new GLargeMapControl()); var mapControl = new GMapTypeControl(); map.addControl(mapControl); mgr = new MarkerManager(map); window.setTimeout(setupMarkers, 0); } } function setupMarkers() { var markers = []; var point = new GLatLng(51.5474,0.715656); var marker1 = createMarker(point,'<div id="overlay"><b>Name</b><br />' + '<img class="thumbnail" src="#" style="border-width: 0px;" /><br />' + '<a href=LinkID=1>More Info</a></div>') markers.push(marker1); var point = new GLatLng(51.3888,0.72222); var marker2 = createMarker(point,'<div id="overlay"><b>Name</b><br />' + '<img class="thumbnail" src="#" style="border-width: 0px;" /><br />' + '<a href=LinkID=2>More Info</a></div>') markers.push(marker2); var point = new GLatLng(51.211,0.7302); var marker3 = createMarker(point,'<div id="overlay"><b>Name</b><br />' + '<img class="thumbnail" src="#" style="border-width: 0px;" /><br />' + '<a href=LinkID=3>More Info</a></div>') markers.push(marker3); mgr.addMarkers(markers, 4); mgr.refresh(); } function createMarker(point,html) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; } </script> <body onload="initialize()" onunload="GUnload()"> However the markers never appear, what am I doing wrong. Thanks for the time Tim Tim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
