View on GitHub

Display a web map.

Image of display map from portal item

Use case

For displaying web maps stored on ArcGIS Online.

How to use the sample

Tap the button to see a list of other web maps. Upon selection, the web map displays in the map view.

How it works

  1. Create a Portal.
  2. Create a PortalItem using the Portal and the web map ID: PortalItem(portal:id:).
  3. Create an Map using the portal item: Map(item:).
  4. Set the map to the MapView.

Relevant API

  • Map
  • MapView
  • Portal
  • PortalItem

About the data

The web maps accessed by this sample show Geology for United States, Terrestrial Ecosystems of the World and Recent Hurricanes, Cyclones and Typhoons.

Tags

portal item, web map