Gets or sets the CoordinateSystem used when displaying the Map in 2D mode.

Namespace:  ESRI.ArcGISExplorer.Mapping

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public CoordinateSystem CoordinateSystem2D { get; set; }
Visual Basic (Declaration)
Public Property CoordinateSystem2D As CoordinateSystem

Field Value

The CoordinateSystem used by the 2D mode.

Remarks

This property allows you to get or set the CoordinateSystem used to display the map in 2D DisplayMode. By default, the CoordinateSystem2D is WGS 1984. The CurrentCoordinateSystem property provides a shortcut to this property if the map is in 2D mode.

The MapDisplay has separate coordinate systems for displaying the map in 2D or 3D mode.

If MapItems in the Map have spatial data with a different CoordinateSystem to that of the MapDisplay, then the items will be automatically reprojected into the CoordinateSystem of the display.

Geographic transformations can be used to increase the accuracy of data reprojection; see the GeographicTransformation class for more information.

Examples

The code below reports on the coordinate system used by the 2D display. Projected coordinate systems are based upon an underlying geographic system - this is also reported if the system used in 2D is a projected one, by using the Type and BaseGeographicCoordinateSystem properties. The code assumes you have imported the Geometry namespace.
CopyC#
ESRI.ArcGISExplorer.Mapping.MapDisplay disp = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay;
CoordinateSystem cs = disp.CoordinateSystem2D;

StringBuilder sb = new StringBuilder("The 2D Coordinate System is:" + cs.Type);
sb.AppendLine("Name: " + cs.Name);
// Projected coordinate systems are based on a separate geographic coordinate system.
if (disp.CoordinateSystem2D.Type == CoordinateSystemType.Projected)
{
    sb.AppendLine("Based on the geographic system:" + cs.BaseGeographicCoordinateSystem.Name);
}
MessageBox.Show(sb.ToString(), "2D Coordinate System Information");
CopyVB.NET
Dim disp As ESRI.ArcGISExplorer.Mapping.MapDisplay = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay
Dim cs As CoordinateSystem = disp.CoordinateSystem2D

Dim sb As StringBuilder = New StringBuilder("The 2D Coordinate System is:" & cs.Type)
sb.AppendLine("Name: " & cs.Name)
' Projected coordinate systems are based on a separate geographic coordinate system.
If disp.CoordinateSystem2D.Type = CoordinateSystemType.Projected Then
    sb.AppendLine("Based on the geographic system:" & cs.BaseGeographicCoordinateSystem.Name)
End If

MessageBox.Show(sb.ToString(), "2D Coordinate System Information")

See Also