Thanks for the input.  I will try the MarkerManager and see if that
works.  I am using EInserts (http://econym.org.uk/gmap/einsert.htm)
for my image overlays, but each image is a different URL and I don't
want to load images that are not visible.  I'm thinking that if I add
markers at each point where I want to overlay an image, and manage
these markers with a MarkerManager, I can monitor for
visibilityChanged events, and when a marker becomes visible, overlay
the appropriate image at that point.  This should prevent images from
being loaded unless they are visible.

On Feb 26, 5:30 am, Mike Williams <[email protected]> wrote:
> Wasn't it Andrew Leach (Maps API Guru) who wrote:
>
>
>
> >On Feb 26, 6:17 am, canada77 <[email protected]> wrote:
> >> I am new to Google Maps and have been learning it quite nicely, but
> >> still can't seem to find the answer to 2 questions:
>
> >> 1)  I have a very large polyLine (13,000 vertexes) that has been
> >> constructed from driving directions.  I want to overlay an image at
> >> specific vertexes along the polyLine, but do not want to overlay the
> >> images that are not currently visible (causes considerable slowdown).
> >> How can I determine, based on the current map view, which vertexes of
> >> the polyLine are currently visible?  I can then add the GroundOverlay
> >> at only the visible vertexes.
>
> >This is a classic case for something like a Marker Manager. Have you
> >tried adding your overlays to a marker manager? (Note: I have no idea
> >whether either GMarkerManager or the open-source version can cope with
> >anything other than markers, but it's worth a try)
>
> MarkerManager can cope with any GOverlay that has a .getPoint() Method.
> So that's only GMarkers and some custom GOverlays (e.g. ELabels)
>
> GMarkerManager can cope with any GOverlay that has the unexposed
> equivalent of a .getPoint() or .getLatLng() Method. So that's only
> GMarkers.
>
> You might possibly be able to extend the GGroundOverlay class to provide
> a .getPoint() method. You'd have to store the information somewhere,
> perhaps as a custom Property of the GGroundOverlay when you create it
>
>   GGroundOverlay.prototype.getPoint = function() {
>     return this.Centre;
>   }
>
>   var g = new GGroundOverlay(image,bounds);
>   g.Centre = bounds.getCenter();
>
> The problem then would be that when you zoom in, GGroundOverlays that
> partially overlap the viewport, but have centres that are outside the
> (viewport + padding) might not be displayed.
>
> --http://econym.org.uk/gmap
> The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
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