Quantcast
Viewing all articles
Browse latest Browse all 2341

Updated Wiki: Notes493part2

1. Licenses for data formats:
MapWinGIS itself is licensed under MPL, which is perhaps isn't too restrictive for most developers. However this doesn't apply to all the data sources that MapWinGIS uses.

Specifically MapWinGIS doesn't grant you any exclusive rights to use data from online services, tile map services in particular. It's universally known that OpenStreetMap is "free" but many others are not or only if your app comply with specific license agreement. If you are going to use those, you should check the licenses. To get an idea about the state of affairs please check these threads: Yandex and Bing maps, Google maps. To summarize it seems Microsoft is more open-minded in that respect than others.

Also MapWinGIS provides access to some of the data formats that have licenses different from that of the project itself (currently MRSid, NetCDF, ECW, probably some others in the future). Make sure to check Licenses folder of MapWinGIS installation for their respective licenses.
2. Improved API for projection mismatch testing.
For the situations when layer is being added to the map with missing coordinate system / projection
if they differ from coordinate system / projection of the map the behaviour can be set:

a) globally, for all layers at once:

var gs = new GlobalSettings();
gs.ReprojectLayersOnAdding = true;
gs.AllowLayersWithoutProjections = true;

b) on layer to layer bases using events:

// adding handles for the events
axMap1.ProjectionMismatch += axMap1_ProjectionMismatch;
axMap1.LayerProjectionIsEmpty += axMap1_LayerProjectionIsEmpty;
axMap1.LayerReprojected += axMap1_LayerReprojected;

// actually handling themvoid axMap1_LayerProjectionIsEmpty(object sender, AxMapWinGIS._DMapEvents_LayerProjectionIsEmptyEvent e)
{
    e.cancelAdding = tkMwBoolean.blnFalse;   // accept layers without projection
    Debug.Print("Layer without projection was added: " + axMap1.get_LayerName(e.layerHandle));
}
void axMap1_ProjectionMismatch(object sender, AxMapWinGIS._DMapEvents_ProjectionMismatchEvent e)
{
    e.reproject = tkMwBoolean.blnTrue;    // try to reproject on the fly
    Debug.Print("Layer with different projection; attempting reprojection: " + axMap1.get_LayerName(e.layerHandle));
}
void axMap1_LayerReprojected(object sender, AxMapWinGIS._DMapEvents_LayerReprojectedEvent e)
{
    Debug.Print("Reprojection results: " + e.success);
}

Viewing all articles
Browse latest Browse all 2341

Trending Articles