Specify a map's spatial reference.
Choosing the correct spatial reference is important for ensuring accurate projection of data points to a map.
Pan and zoom around the map. Observe how the map is displayed using the World Bonne spatial reference.
- Instantiate a
Map
object using a spatial reference e.g.ArcGISMap(SpatialReference.Create(54024))
. - Instantiate a
Basemap
object using anArcGISMapImageLayer
object. - Set the base map to the map.
- Set the map to a
MapView
object.
The ArcGIS map image layer will now use the spatial reference set to the ArcGIS map (World Bonne (WKID: 54024)) and not it's default spatial reference.
- ArcGISMapImageLayer
- Basemap
- Map
- MapView
- SpatialReference
Operational layers will automatically project to this spatial reference when possible.
project, WKID