I'm having an issue implementing a PNG-based feature using
GGroundOverlay objects. The new feature I'm working on for my web
application will generate a PNG image onto the map to represent the
flight path for any aircraft displayed on the screen. Using boundary
information, a server side program generates a transparent PNG to be
overlayed onto the map. Since this application is for tracking
purposes, in addition to normal mapping controls such as panning, the
images need frequent updating.

But I've found that every time new images are generated and replace
the old ones, the browser's memory usage in Task Manager increase. So
far, it hasn't been a problem for Chrome, and less so for Firefox,
since they seem to be capable of releasing old memory. But IE8's
memory usage only climbs and climbs.

Each image is created as such, using an image name retrieved from an
AJAX response:

pngPath[imei] = new GGroundOverlay("scripts/pngGen/img/" + response,
new GLatLngBounds(new GLatLng(sw_lat, sw_lon), new GLatLng(ne_lat,
ne_lon)));
map.addOverlay(pngPath[imei]);

And to remove old images when new ones are requested, I use
map.removeOverlay(pngPath[imei]), then set pngPath[imei] to null. I've
tried both using removeOverlay and clearOverlays to see if it made a
difference, but the results have been the same.

Is there something I can implement to avoid this issue? Is there
perhaps a better way of designing a dynamic PNG overlay within the
Google Maps API? A known bug with the overlay?

Any help or tips are greatly appreciated. Let me know if you need any
more info!

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