Is there a know issue where the xamGeograhpicMap memory footprint grows while panning/zooming? In particular, we can reproduce the behavior in a standalone app with nothing but the map using OpenStreetMap and zoomed into highest resolution tiles. Start in new york and pan west, the process grows to about 800MB and then crashes with OutOfMemory exception.
We hoped it was because we were using an older 12.2-based version. We just upgraded to 13.2 and found the same behavior. What can we do? It's now an emergency since we advertised the capability after seeing how quickly we could get it in there.
Attached is a solution which exhibits the problem. It's a completely default map which zooms into Wash DC and proceeds to pan horizontally with a timer. Takes a half hour or more to crash but you can see it grow consistently and w/o bounds (until crashing).
Hello Jim,
Thank you for your post. I have been looking into the behavior that you have described and the reason for it is that OpenStreetMapImagery is buffering the already downloaded images. In order to avoid the behavior, I can suggest clearing the already cached images by calling the ClearTileCache method of the OpenStreetMapImagery class in after some period of time. For example, in the sample that you have attached, you can add a counter and clear the cached data every 100 ticks of the DispatcherTimer. I have modified the sample application that you have attached to show how you can implement this approach.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Thank you for your reply. I am very glad that my suggestion was helpful for you. Please let me know if you need any further assistance on the matter.
Thanks so much for your solution. I wonder how I missed the fact that you're caching tiles? Seems that periodically clearing the cache would be an important part of anyone's implementation.
Anyway you saved the day (and our release) and I appreciate the support very much. Especially on a weekend.