OK, I've already attempted to implement the below before I posted ...
seems like a good idea, but the move event actually moves the map as
well for each move event even if my condition is false (meaning don't
move). SO I would need to call setCenter 299 times more than I would
need to to cancel the event.

Any suggestions?

Cheers

On Jul 21, 5:49 pm, Andrew Leach <[email protected]>
wrote:
> On Jul 21, 10:28 pm, netski <[email protected]> wrote:
>
>
>
> > Scenario: when someone drags from one edge of the screen to the other,
> > which fires 300 move events, after the first move event is executed I
> > check a condition. If the condition is not met then I would like to
> > cancel the other 299 move events that are called.
>
> You could test for a flag variable at each move event: if the flag is
> false, don't do anything. That would be fairly inexpensive. If the
> flag is true, test your condition and act on it. If the condition
> fails, set the flag to false so that future move events are
> inexpensive. On a moveend event, set the flag to true so that the real
> condition is tested next time round.
>
> Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to