Open map URL

View inWPFUWPFormsiOSAndroid
View on GitHub

Display a web map.

Image of open map URL

Use case

For displaying web maps stored on ArcGISOnline (e.g. soil survey results, as demonstrated in this sample).

How to use the sample

A web map can be selected from the drop-down list. On selection the web map displays in the map view.

How it works

  1. Create a Portal from the ArcGIS URL
  2. Create a PortalItem using the Portal and the web map ID: new PortalItem(portal, ID).
  3. Create a Map using the portal item.
  4. Set the map to the MapView.

Relevant API

  • Map
  • MapView
  • Portal
  • PortalItem

Additional information

Mobile map packages can also include address locators and geometric networks. For an example of this, see the "Mobile Map Search and Route Sample".


portal item, web map

Sample Code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns=""
      <RowDefinition Height="auto" />
      <RowDefinition Height="*" />
      <Button x:Name="MapsButton" Text="Maps" Clicked="OnMapsClicked"></Button>
      <esriUI:MapView x:Name="MyMapView" Grid.Row="1"/>