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


IMapControl4.SpatialReference Property (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Controls)  

IMapControl4.SpatialReference Property

Spatial reference of the Map.

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

Product Availability

Available with ArcGIS Engine.

Description

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

IMapControl4 Interface | IMapControl3.Map Property | IMapControl4.Map Property | IMapControl2.Map Property | IMapControl3.MapScale Property | IMapControl4.MapScale Property | IMapControl2.MapScale Property | IMapControl2.MapUnits Property | IMapControl4.MapUnits Property | IMapControl3.MapUnits Property | IMapControl4.ReferenceScale Property | IMapControl3.ReferenceScale Property | IMapControl2.ReferenceScale Property