on the example the data are in json , my data are in xml so if I try
to use this script I have more error:
var markers = [];
for (var i = 0, dataPhoto; dataPhoto = data.photos[i]; i++) {
var latLng = new google.maps.LatLng(dataPhoto.latitude,
dataPhoto.longitude);
var marker = new google.maps.Marker({
position: latLng
});
markers.push(marker);
}
var markerCluster = new MarkerClusterer(map, markers);
I don't know how to modify this for get my markers in my xml ?
Do you know how to make this ?
On Nov 27, 4:26 pm, Rossko <[email protected]> wrote:
> > I suppose, i need to use addMarkers() but how it's work ?
>
> You create a clusterer object, which you already do in your script as
> 'mc'
> Then you need to add any markers to that object that you want it to
> manage.
> You can add them one at a time using addMarker()
> Or you can add them in a bunch as an array using addMarkers()
>
> > do you have
> > an example ?
>
> Here are examples, on exactly the same
> pagehttp://google-maps-utility-library-v3.googlecode.com/svn/trunk/marker...
>
> > I need tu use markerclusterer.js ?
>
> Yes, if you want to have clustering.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.