Global Mapper Pro Coming Soon

GM_LoadOnlineLayer with vector (WFS) data

BurroWranglerBurroWrangler Global Mapper UserPosts: 26Trusted User

I'm trying to download WFS vector data using GM_LoadOnlineLayer without prompting the user for a filename.  I have a filename I want to pass into the GM_LoadOnlineLayer function but there does not appear to be a method for doing this.  For example, I have the following WFS server that I've defined in a user_online_sources.xml file for my application:

<source type="WFS">
    <group>FEMA Vector Data</group>

Then I call GM_LoadOnlineLayer using the following code:

  GM_Rectangle_t olRect;
  olRect.mMaxX = -78.521561621681016;
  olRect.mMaxY = 35.779925110918278;
  olRect.mMinX = -78.558683394541518;
  olRect.mMinY = 35.761644674699923;
  GM_LayerHandle_t32 handle;
  GM_Error_t32 err = 
    GM_LoadOnlineLayer("Base_Flood_Elevations", &olRect, &handle, NULL);

This function does not bring up the dialog to select the online data I want to download (this is what I want), but it does bring up a dialog to define a filename for the downloaded vector .gml file (I do not want this).  Is there any way to pass GM_LoadOnlineLayer a vector filename and have it save this vector file instead of prompting for a filename?  Or is there some other workaround so the save file dialog does not come up when this function is called?  I am able to export the vector file to my desired filename later using GM_ExportVector, but I would like to export the file to the desired filename when GM_LoadOnlineLayer is called or at least save the file to a specified location and then export the file later.  Any ideas how I can avoid bringing up the save file dialog when GM_LoadOnlineLayer is called?


Sign In or Register to comment.