MAPDATUM

May 12, 2015 at 12:28 PM
Edited May 12, 2015 at 12:31 PM
Good morning.
How do I know in VBA if the map that I loaded in my control map is WGS84?
Nicolò
Developer
May 12, 2015 at 8:09 PM
Comparison of coordinate systems can be difficult since often there is no canonical definition. Therefore for practical purposes I would recommend GeoProjection.get_IsSameExt:
private bool IsWgs84(AxMap map)
{
    var gp = new GeoProjection();
    gp.SetWgs84();
    return map.GeoProjection.get_IsSameExt(gp, axMap1.Extents);
}
Hope it helps,
Sergei
May 13, 2015 at 11:34 AM
Ok. I solved in this way to get Datum:

MyImg.GeoProjection.NAME 'returns mapdatum eg WGS 84, ED50, etc

Thank you.

Nicolò
Developer
May 13, 2015 at 11:42 AM
Fine, just be cautious, since the name may be different even if a definition is the same.