After a bit investigation it looks like obj.map.setCenter is being called after each marker is added. It should only be called once, after all of the markers have been added. This workaround works for me but I'm not totally sure about the logic/placement.

Comments

bdragon’s picture

Status: Needs work » Fixed

Ooh, that gave me a great idea... I can put it in the markersready event!
Committed. http://drupal.org/cvs?commit=123684

marcoBauli’s picture

Status: Fixed » Active

this still to happens on maps with more than a hundred of markers. Also the browser (IE, FF, Safari) throws the error:

"A script in this page has stopped working. You can stop the script now, or wait"

bdragon’s picture

Do you get that for this?:
http://gmap.chicagotech.org/node/5

marcoBauli’s picture

umm, nope, the map on your URL loads fine and quick actually..

Updated to beta1: now the error is gone, but loading the map on IE and FF takes literally ages..

i just sent you a web address where you can see this.

PS: the map is generated with gmap_views + cck content-type + location api.

thx

bdragon’s picture

Assigned: Unassigned » bdragon

Hmm, I'm going to guess mass attaching of event handlers...

I have considered using a map level event handler instead of individual handlers... I should implement that and see if it helps...

bdragon’s picture

StatusFileSize
new2.08 KB

Here's an alternate way of binding the events that should theoretically help a lot.

How much does this improve things?

bdragon’s picture

Status: Active » Needs review
marcoBauli’s picture

bdragon,

the issue seems fixed after an upgrade to beta2. Now map and markers (350 circa) load in a snap!

tryed your last patch to see if this could be pushed even faster, but did not notice any improvement.

thanks for your effort on this delicious module ;)

bdragon’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.