Show / Hide Table of Contents

Constructor Map

Map()

Initializes a new instance of the Map class.

Declaration
public Map()

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.0 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.0
Relevant samples
Display layer view state: Determine if a layer is currently being viewed.

Map(Basemap)

Initializes a new instance of the Map class with a Basemap.

Declaration
public Map(Basemap basemap)
Parameters
Type Name Description
Basemap basemap

The basemap for the map.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.0 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.0
Relevant samples
Access load status: Determine the map's load status which can be `NotLoaded`, `FailedToLoad`, `Loading`, `Loaded`.
Add ENC exchange set: Display nautical charts per the ENC specification.
Add features: Add features to a feature layer.
Analyze hotspots: Use a geoprocessing service and a set of features to identify statistically significant hot spots and cold spots.

Map(BasemapStyle)

Initializes a new instance of the Map class with a BasemapStyle.

Declaration
public Map(BasemapStyle basemapStyle)
Parameters
Type Name Description
BasemapStyle basemapStyle

Style of the basemap.

Remarks

These basemaps are secured and access requires either an ApiKey or a named user.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.10 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.10 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.10 - 100.12
Android100.10 - 100.15
iOS100.10 - 100.15
UWP100.10 - 200.0

Map(Uri)

Initializes a new instance of the Map class with a Uri to a web map.

Declaration
public Map(Uri uri)
Parameters
Type Name Description
Uri uri

Uri of a webmap on ArcGIS Online or ArcGIS Enterprise portal. A PortalItem will be created to reference the webmap and accessible through Item.

Remarks

If the specified Uri is a portal item URL , the underlying PortalItem will be created and accessible through Item. The uri may be a direct Uri to web map JSON content or the Uri of a portal item.

The supported URL formats are:

  • The URL of a webmap opened in the portal's map viewer web application (classic or new). Example: https://www.arcgis.com/home/webmap/viewer.html?webmap=8bf7167d20924cbf8e25e7b11c7c502c or https://www.arcgis.com/apps/mapviewer/index.html?webmap=8bf7167d20924cbf8e25e7b11c7c502c
  • The URL of the webmap item details web page. Example: https://www.arcgis.com/home/item.html?id=c6a2c53ead68432586cc9ac9ec366055
  • The REST Sharing API URL of the webmap item (with or without the query parameter f=json). Example: https://www.arcgis.com/sharing/rest/content/items/c6a2c53ead68432586cc9ac9ec366055?f=json
  • The REST Sharing API URL of the webmap item data. Example: https://www.arcgis.com/sharing/rest/content/items/c6a2c53ead68432586cc9ac9ec366055/data
Examples of supported portal item Uri values:
  • http://www.arcgis.com/home/item.html?id=<web_map_id>
  • http://www.arcgis.com/home/webmap/viewer.html?webmap=<web_map_id>
  • http://www.arcgis.com/sharing/rest/content/items/<web_map_id>/data

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 iOS200
.NET Framework100.0 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.14
iOS100.0 - 100.15
UWP100.0 - 200.0
Relevant samples
Show location history: Display your location history on the map.

Map(Item)

Initializes a new instance of the Map class with an ArcGIS Item.

Declaration
public Map(Item item)
Parameters
Type Name Description
Item item

The webmap item. Only PortalItem are supported.

Remarks

The specified item must be of type WebMap or the Map will fail to load

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.0 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.0
Relevant samples
List related features: List features related to the selected feature.
Map reference scale: Set the map's reference scale and which feature layers should honor the reference scale.

Map(SpatialReference)

Initializes a new instance of the Map class with a specified spatial reference.

Declaration
public Map(SpatialReference spatialReference)
Parameters
Type Name Description
SpatialReference spatialReference

The spatial reference to use on the map.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.0 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.0
Relevant samples
Buffer list: Generate multiple individual buffers or a single unioned buffer around multiple points.
Clip geometry: Clip a geometry with another geometry.
In This Article
Back to top Copyright © 2022 Esri.