Partially loaded script
Hi,
using GM_LoadLayerList I'm trying to load some layers from a .gmw file.
Whenever a file is missing, I have a pop up dialog asking whether I want to select a new location or skip the file. If I skip the file, a new popup asks whether to cancel the entire operation or not. If I continue, the script continues to load, but in the end, the GM_LoadLayerList function returns an error 63 (Error_Script) and an empty layer list.
I was expecting the function to return the layers that were properly loaded. Is there any other method to call to achieve that goal ? Or from the API, the slightest error prevents the correct layers to be loaded ?
Thanks
Best Answer
-
I can see the issue that you are referring to and have created internal task GMSDK-648 to address it.
What you could do in this case is call GM_GetLoadedLayerList before and after the call and using the number of loaded layers before and after extract the layer handles of the newly loaded layers.
Thanks,
Mike
Global Mapper Guru
Answers
-
As expected this is exactly what I needed.
Thanks a lot,
Yann
Categories
- 13K All Categories
- 5.8K Features Discussion
- 351 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 422 Projection Questions
- 837 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 182 Announcement and News
- 944 Bug Report
- 565 SDK
- 1.2K Suggestion Box
- 3.8K Technical Support
- 582 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 245 How I use Global Mapper
- 111 Global Mapper Forum Website
