On Oct 8, 1:03 pm, "St.terk" <[EMAIL PROTECTED]> wrote: > Hi all > Currently dazed and confused...lol > > http://www.dollarstorehelp.com/test.html > > Is my code in the proper order? > Is the use of GMarkerManager correct?
Firefox Error console... (or anyother browser) You have syntax errors. Fix them. Error: syntax error Source File: http://www.dollarstorehelp.com/test.html Line: 162, Column: 2 Source Code: }); Error: load is not defined Source File: http://www.dollarstorehelp.com/test.html Line: 1 -- Larry > > I have 50,000 marker to display, and zoom level seems the best way to > avoid clustering. > > After reading several examples ( thank you in advance Ralph and Mike) > my code is in this order. > > // A function to create the marker and set up the event window > > function createMarker(point,name) { > var marker = new GMarker(point); > GEvent.addListener(marker, "click",function() { > marker.openInfoWindowHtml(name); > }); > return marker; > } > > // Read the data from Centers.xml > > GDownloadUrl("Centers.xml",function(doc) { > var xmlDoc = GXml.parse(doc); > var markers = > xmlDoc.documentElement.getElementsByTagName("Centers"); > for (var i = 0; i < markers.length; i++) { > > // obtain the attribues of each marker > var lat = parseFloat(markers[i].getAttribute("Latitude")); > var lng = parseFloat(markers[i].getAttribute("Longitude")); > var point = new GLatLng(lat,lng); > var label='<div>'; > var label = markers[i].getAttribute("Cname"); > label +='<br>'; > label += markers[i].getAttribute("Caddress"); > label +='<br>'; > label += markers[i].getAttribute("Ccity"); > label +='<br>'; > label += markers[i].getAttribute("Cstate"); > label +='<br>'; > label += markers[i].getAttribute("Czip"); > label +='<br>'; > label += markers[i].getAttribute("Ccounty"); > var marker = createMarker(point,label); > > // Display Map > > var map= new GMap2(document.getElementById("map")); > map.addControl(new GLargeMapControl()); > map.addControl(new GMapTypeControl()); > map.setCenter(new GLatLng(39.449768, -95.009766), 3); > var lm= new GMarkerManager(map,{borderPadding:1}); > lm.addMarkers(marker, 12, 17); > lm.refresh(); > }); > > } > > Peace > Raul --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
