Wednesday, January 20, 2010

Re: Clustermarker via XML problem

Hi Rossko,

Thanks for the reply, I removed the clusterer from the for loop, now
all my locations are loading but the clusterer isn't kicking in.

could you please elaborate as to where I am creating a new clusterer
(and destroying one) .

Apologies I am not the best at javascript.

Thanks again

On Jan 20, 7:19 pm, Rossko <ros...@culzean.clara.co.uk> wrote:
> > I have the ClusterMarker installed, however it's only loading the
> > first location from my XML
>
> You're creating a new clusterer (and destroying the previous one) in
> mapint.js for every marker you read from XML.
> Don't do that, create just one clusterer (like you create just one
> map).
> The most efficient way to load the markers is to push each one on to
> an array, and after all marker creations are finished, pass the array
> to the clusterer.
> Docs -
>  http://googlemapsapi.martinpearman.co.uk/readarticle.php?article_id=2
> Observe that the line creating the cluster is outside of the marker
> for-loop.
> Example from the docs -
>    http://googlemapsapi.martinpearman.co.uk/infusions/google_maps_api/ba...

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate