Feature request for online layers loaded using GM_LoadOnlineLayer

BurroWranglerBurroWrangler Global Mapper UserPosts: 26Trusted User
edited December 2011 in SDK

I have a feature request for layers loaded using GM_LoadOnlineLayer. This feature would be very nice for people and I think it would not be too hard for you to implement.

The problem we have is that when we load an image (or any other online data) using GM_LoadOnlineLayer and then subsequently get the pixels for the layer using GM_DrawLayerListToMemory, the GM_DrawLayerListToMemory function call can take a long time (since new data may need to be downloaded). This is especially the case if users are doing lots of panning/zooming of the display in the program. I noticed this is an issue with Global Mapper also. The program is tied up so I can't do anything for a little bit of time if I pan/zoom an online image. Is there a way for you to do the following when GM_DrawLayerListToMemory is called if the layer being drawn includes an online layer:

1. Immediately draw whatever image data is immediately available on disk in the layer(s) passed. If nothing is available, just return a blank screen.
2. Return execution back to the calling program.

After the data for the new layer has been downloaded:

1. Call a callback function, provided by the user of the SDK (you could make a new function in the SDK where this callback function would be provided).
2. This callback function would call GM_DrawLayerListToMemory, which would immediately return the new set of pixels.

For us to implement this ourselves, we would need to store and display whatever pixels we currently have and then create a new thread that would download the new image using GM_DrawLayerListToMemory while the user continues what he/she is doing. We could do it, but I have discovered that this can be a major headache for us to implement. Is there any way you could make this capability available, or is it already available? Have you heard of anybody who has implemented something like this? Google Maps and ArcGIS seem to use an approach like this when panning/zooming, but I'm not sure how they do it.


  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited December 2011
    That does sounds like a good idea and could be possible to implement without too much effort, although I can foresee complexity such as if the user pans or zooms around while the background download is happening you would have to have a way to abort that and then start the new one. I will add this to the todo list though.


    Global Mapper Guru
  • BurroWranglerBurroWrangler Global Mapper User Posts: 26Trusted User
    edited December 2011
    Sounds great Mike; it would be good to know if you're able to implement this feature.

Sign In or Register to comment.