On Sep 26, 11:18 am, Andrew Leach <[email protected]>
wrote:
> On Sep 26, 3:10 pm, Jake <[email protected]> wrote:
>
>
>
> > 4. Is there a way to disambiguate the user panning/zooming that comes
> > from a user as opposed to "automatic" panning/zooming originated by
> > the Javascript making viewport adjustments? I want to get new results
> > when the user pans/zooms, not when the Javascript pans/zooms.
>
> Well I had thought that user drags triggered a dragend event, while
> automatic pans for the infoWindow didn't. Moveend events can be
> triggered by the infoWindow or by using the "pan" buttons in the map
> control.
You are correct. It seems what was causing problems was actually the
zoom, as I may zoom in to results on a given page. And temporarily
disabling the zoom event handler right before zooming to results
solves the zoom problem.
> Have you tried testing for whether the infoWindow is open? If it's
> open when a moveend/dragend is triggered, then it's probably an
> automatic pan and you don't need to fetch more data.
>
> Andrew
I will look into that, however, the user can drag with a window open.
Btw:
I just noticed that expanding the results bounds when the JS pans to
view outlying result isn't working as well as I thought. Panning
takes some amount of time, what's happening is:
1. I call set center
2. I expand the result bounds
3. It finishes panning sometime later so the result bounds weren't
expanded to new viewport.
4. User moves even one pixel, and it reloads the results, because
viewport is not in results bounds.
I suppose it isn't horrible, but from a user experience perspective,
it just seems strange:
For example:
http://devasp.northcarolina.edu/iic/exams/find.php?q[text]=&q[location]=rocky+mount%2C+nc
go to the last page of results, then move a little, it reloads results
on left.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---