I think I've just found something of more detailed to help fixing the
problem.

First of all, your remark on my ambiguous use of poly path is
absolutely correct.
In my real code, it is not so; but in this example, you are right (I
made so to use shortly the fitBounds method).
Anyway, I have just written a version of this page that does NOT
update poly paths: http://www.cercaprivati.com/12345A.htm.
Unfortunately, also this page arises the error.

More interesting, I have lastly rewritten the initial page without
adding the map parameter in the setOptions method: 
http://www.cercaprivati.com/12345.htm.
Everything else is unchanged.
Well, (at the moment) I can't get the error in this page.
I made the same change in my original application (fortunately, it is
quite easy), and (at the moment) I can't get the error.

On 10 Feb, 22:51, Rossko <[email protected]> wrote:
> > Try this:http://www.cercaprivati.com/12345.htm
>
> I can reproduce your error (which has something to do with mouseup) in
> FF2, and also a similar error to do with mousemove.
> Guessing, but maybe this area of code is handling events on polys, or
> maybe it runs when paths are changed.
>
> > I think the focal points are the setTimeout that set polygons
> > options.
> > In this example using setTimeout looks quite stupid, but in my code I
> > have some reason more to do it.
>
> I think you are right to look hard at this.  Using setTimeout like
> that isn't at all silly, it can be useful to get function calls onto
> the end of the browser's execution queue where there is lots of
> asynchronous activity gong on - like in the v3 API.
>
> What looks like a problem area is that you have code called that way
> that changes the poly paths (even if it is "updated" to the same
> points), while you've also got code in the rest of selectPrm() that
> reads the same poly paths.   I suspect you are setting up a race
> condition here.  It might help to do the reading before asking for the
> update.
>
> Must admit I don't get the purpose of the bounds business in there, in
> normal circumstances this would work on the 'old' poly path, is that
> what you intended?
>
> It's possible the errors arise when the click listener is re-triggered
> again, before the previous run is complete.

-- 
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.

Reply via email to