ESRI.ArcGIS.ADF.IMS
SpatialReference Property
See Also 
ESRI.ArcGIS.ADF.IMS.Carto Namespace > MapView Class : SpatialReference Property




Gets or sets the Spatial Reference properties for how this MapView object should be drawn.

Syntax

Visual Basic (Declaration) 
Public Property SpatialReference As SpatialReference
Visual Basic (Usage)Copy Code
Dim instance As MapView
Dim value As SpatialReference
 
instance.SpatialReference = value
 
value = instance.SpatialReference
C# 
public SpatialReference SpatialReference {get; set;}

Example

For an example of setting the SpatialReference of the map, see Geometry.SpatialReference.

Remarks

The SpatialReference includes the coordinate system (projection) of the map, along with the datum transformation, if any. For a general discussion of coordinate systems and datum transformations, see the ArcIMS Help.

The coordinate system should be set in the map service definition before it is served. For standard image services, this may be done by adding a FEATURECOORDSYS tag to the ArcXML file defining the service (for details, see ArcIMS Help). For ArcMap Server services, each data frame should have its coordinate system set in the properties of the data frame. If the coordinate system is not defined for the service, then SpatialReference will be null (Nothing) and cannot be changed for the map, unless each layer has its coordinate system defined, for example with a .prj file associated with a shapefile used in a standard image service, or with a COORDSYS tag added to each layer in the ArcXML map configuration file.

The coordinate system and datum transformation may be changed if the map service defines a SpatialReference, that is, the SpatialReference is not null (Nothing) upon creation of the MapView. If the SpatialReference is null, and a SpatialReference is set by the application, then only map layers that contain coordinate system information will be projected in the map. This applies to both the SpatialReference property and the Draw(SpatialReference) method.

See Also

© 2010 All Rights Reserved.