The units for the map.
[Visual Basic .NET]
Public Property MapUnits As esriUnits
[C#]
public esriUnits MapUnits {get; set;}
[C++]
HRESULT get_MapUnits(
esriUnits* unitsCode
);
[C++]
HRESULT put_MapUnits(
esriUnits unitsCode
);
[C++]
Parameters
unitsCode [out, retval]
unitsCode is a parameter of type esriUnits
unitsCode [in]
unitsCode is a parameter of type esriUnits
Product Availability
Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
Remarks
MapUnits is the predefined enumeration (
esriUnits) data type currently associated with the Map object.
AddLayer automatically attempts to set the Map's SpatialReference property if a coordinate system has not yet been defined for the map. When the SpatialReference property is set, the Map's MapUnits and DistanceUnits properties are set as well.
When multiple layers are added simultaneously with AddLayers, the first spatial reference found is used.
If no layers have a spatial reference, AddLayer checks the extent of the first layer (ILayer::AreaOfInterest) and if it has coordinates that look like geographic coordinates (XMin >= -180 and XMax <= 180 and YMin >= -90 and YMax <= 90), ArcMap assumes the data is in decimal degrees and sets the MapUnits to esriDecimalDegrees and DistanceUnits to esriMiles.
If no spatial reference is found and the coordinates do not look like geographic coordinates, ArcMap sets no spatial reference and sets the MapUnits to esriMeters and the DistanceUnits to esriMeters.
See Also
IMap Interface
.NET Related Topics
How to create map grids