This document is archived and information here might be outdated.  Recommended version.

IMapControlDefault.SpatialReference Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IM > IMapControlDefault Interface > IMapControlDefault.SpatialReference Property
ArcGIS Developer Help

IMapControlDefault.SpatialReference Property

Spatial reference of the Map.

[Visual Basic .NET]
Public Property SpatialReference As ISpatialReference
public ISpatialReference SpatialReference {get; set;}
HRESULT get_SpatialReference(
HRESULT putref_SpatialReference(

Product Availability

Available with ArcGIS Engine.


This property is a shortcut to IMap::SpatialReference. The Map's SpatialReference will be set automatically to match the SpatialReference of the first  Layer added to its layer collection. If the first Layer added has no SpatialReference defined, the coordinates in the Layer will be analyzed. If the coordinates range from 0 - 180, the MapControl assumes the layers data is geographic (i.e. contains unprojected coordinates in latitude and longitude) and the SpatialReference will appear as "GCS_Assumed_Geographic_1". If the MapControl cannot determine that the data source is geographic, the current SpatialReference will be "Unknown". The SpatialReference is also "Unknown" if the MapControl contains no data.

See Also

IMapControlDefault Interface