Handling of empty KML files

vshibaevvshibaev Global Mapper UserPosts: 8
edited October 2010 in SDK
Hello, Mike!

I am looking for a way how to determine programmatically if KML file has no geo data. For attached file Global Mapper shows a message "No data could be loaded from the file Layer_ring_empty.kml" and LoadError flag is retrieved from LoadLayerXXX.

Could you give me some advices? May be it's possible to retrieve something like KmlHasNoData in this case? Or some suggestions how to implement a simplified parsing for such files?

Thank you in advance!
Vitaliy Shibaev

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited October 2010
    I would suggest just calling GM_SetMessageCallback to provide your own callback function to get error messages rather than having them be displayed to the user, then you can just look for that "No data could be loaded" message when you load a file to see if the load error was that it was empty.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • vshibaevvshibaev Global Mapper User Posts: 8
    edited October 2010
    Thanks, Mike! This is what I need.
Sign In or Register to comment.