ArcGISMap

constructor(basemap: Basemap)

Creates a map with a Basemap.

Since

200.1.0

Parameters

basemap

A basemap object.


constructor(basemapStyle: BasemapStyle)

Creates a map with a BasemapStyle.

Since

200.1.0

Parameters

basemapStyle

The basemap style.


constructor(item: Item)

Creates a map with a portal item of type com.arcgismaps.portal.PortalItemType.WebMap. The PortalItem automatically loads when the ArcGISMap loads. If the loaded Item is not a portal item of type com.arcgismaps.portal.PortalItemType.WebMap, the map fails to load.

Since

200.1.0

Parameters

item

A web map PortalItem.


constructor(spatialReference: SpatialReference? = null)

Creates a map with the specified spatial reference.

Since

200.1.0

Parameters

spatialReference

A spatial reference object.


constructor(uri: String)

Creates a map with the URL to a web map. If the specified URL is a portal item URL, the underlying PortalItem is created and can be accessed through ArcGISMap.item. The URL can be a URL to web map JSON content or the URL of a portal item.

Examples of supported URL formats:

  • The web map viewer page, for example: https://www.arcgis.com/apps/mapviewer/index.html?webmap=55ebf90799fa4a3fa57562700a68c405

  • The web map viewer page (classic), for example: https://www.arcgis.com/home/webmap/viewer.html?webmap=55ebf90799fa4a3fa57562700a68c405

  • The web map item details page, for example: https://www.arcgis.com/home/item.html?id=55ebf90799fa4a3fa57562700a68c405

  • The REST sharing API data page, for example: https://www.arcgis.com/sharing/rest/content/items/55ebf90799fa4a3fa57562700a68c405/data

  • The REST sharing API page (with or without the query parameter f=json), for example: https://www.arcgis.com/sharing/rest/content/items/55ebf90799fa4a3fa57562700a68c405?f=json

Since

200.1.0

Parameters

uri

URL of a web map on ArcGIS Online or ArcGIS Enterprise portal.

See also

PortalItem.PortalItem

(String)