On Sep 10, 6:02 am, "Enric G. Torrents" <[email protected]> wrote: > The URL is:http://www.aiworld.co.uk/index.html. > > The current code is: > > function load() { > if (GBrowserIsCompatible()) { > var map = new GMap2(document.getElementById("aiworld_map")); > map.addControl(new GSmallMapControl()); > map.addControl(new GMapTypeControl()); > map.setCenter(new GLatLng(10, 0), 2); > > // MYSQL -> PHP -> Markers > GDownloadUrl("phpsqlajax_genxml3.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 address = markers[i].getAttribute("address"); > var type = markers[i].getAttribute("type"); > var point = new > GLatLng(parseFloat(markers[i].getAttribute("lat")), > > parseFloat(markers[i].getAttribute("lng"))); > var marker = createMarker(point, name, address, type); > map.addOverlay(marker); > } > }); > } > } > > function createMarker(point, name, address, type) { > var marker = new GMarker(point, customIcons[type]); > var html = "<b>" + name + "</b> <br/>" + address; > > GEvent.addListener(marker, 'click', function() { > marker.openInfoWindowHtml(html); > > }); > return marker; > > } > > And these are the markerclusterer lines I am supposed to add to > cluster the markers: > > var markers = []; > for (var i = 0; i < 100; ++i) { > var latlng = new GLatLng(data.photos[i].latitude, > data.photos[i].longitude); > var marker = new GMarker(latlng); > markers.push(marker); > } > var markerCluster = new MarkerClusterer(map, markers); > > But when I tried to do so the map failed to display any marker at all.
A link to the broken map would be more useful (you can leave the main map "working" and create a separate test page to show the broken behavior). -- Larry > > Enric G. Torrents > > On Sep 9, 10:55 pm, "Andrew Bidochko <[email protected]>" > > > > <[email protected]> wrote: > > What's an URL to your implementation? > > > ~ Andrew Bidochkohttp://MapBuilder.net > > > On Sep 9, 2:12 pm, "Enric G. Torrents" <[email protected]> wrote: > > > > Hi all, > > > > I am looking for a simple way of integrating MarkerClusterer to my > > > googlemap. I created it following this tutorial from Google, so the > > > code is quite the > > > same:http://code.google.com/apis/maps/articles/phpsqlajax.html > > > It gets all markers from a XML file generated through a PHP script. > > > Sorry if that has been asked before, I have looked to some similar > > > threats but I didn't manage to make it work. > > > > Any help would be greatly appreciated!!! Thanks!!! > > > > Enric G. Torrents > > > aiworld.co.uk -- 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.
