I have paginated results on the left, map on the right. The paginated
results are bound by a "results area" on the map (a minimum bounding
rectangle for all results in the paginated result set).  When the user
goes to the next page, it pans and zooms to whatever results are on
that page.

http://devasp.northcarolina.edu/iic/exams/find.php?q[text]=&q[location]=raleigh%2C+nc



When the user/viewport goes "outside" of the results area and dragend
or zoomend event fires, I would like to get new results, but this is
more tricky than I thought it would be.

1. What should define "outside?" There has to be some extra space on
the edges to allow the room for "automatic" pans and zooms without
refreshing results, for example:
- if the page of results contains a result on the edge of the results
area, it will pan to that result, the result will be in the middle of
the viewport, and of course the viewport will be off the edge of the
results area.
- if a user opens an info window, it will pan to show that info
window.

2. I experimented with:
- 1.disabling dragend/zoomend event handlers right before user goes to
different page,
- 2. next page causes pan/zooms to results on theat page,
- 3. expanding the result area bounds to include new viewport,
- 4. Turn on the event handlers again.

This works ok.

3. However, I also tried disabling the dragend event as the user
clicks info window, turning it back on when info window opens.
The problem is even after info window opens, the map is still panning.
So the event fires anyway and new results are retrieved.

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.

5. Is there a better way and I'm just doing this all wrong? :-)

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