Skip To Content

Use URL parameters to modify maps

A map authored with Map Viewer contains a basemap; data layers; an extent; a legend; and navigation tools such as zoom, pan, place finders, and bookmarks. Many maps also contain interactive elements such as a basemap gallery, measure tools, pop-ups, and buttons for playing data over time.

As an alternative to creating maps with Map Viewer, you can create and modify maps directly with URL parameters.

For example, here's how you could construct a map with URL parameters that shows onshore wind farms in the United Kingdom.

What to include in the URL

The URL always begins with the ArcGIS Enterprise portal home page, plus /webmap/viewer.html? and one or more of the query parameters listed below. To include more than one parameter, use an ampersand (&) to separate the parameters.

For example:,45&level=4

If any of the resources in the URL parameter are provided as HTTP, the URL for the map should be HTTP as well. For added security, you should use an HTTPS URL if possible.

Encode the query parameters

All query parameters must be encoded. URL encoding ensures that valid characters are sent to the portal website. Encoding replaces invalid characters with % followed by their hex equivalent.

For example, here is an unencoded URL parameter:


Here is the same parameter encoded:

Parameters within parameters must also be encoded, for example:

The web has many free sites and tools for generating encoded URLs. For readability, the rest of the examples in this topic are not encoded.

Open a saved map

To open a saved map created with Map Viewer, use webmap= and the unique ID of the map.

For example:

Define the basemap

To define the basemap, set basemapUrl= to the layer. If a basemap is not defined, the default basemap will be the World Topographic basemap.

For example:

Include a reference layer

To include a reference layer with the basemap, set basemapReferenceUrl= to the layer. The basemapReferenceUrl= parameter must be used in addition to the basemapUrl parameter.

For example:

Define the operational layers

To define the operational layers that overlay the basemap, use webmap=, layers=, url=, or urls=. If the layer is an item in the website, use layers= so you get all the layer configurations. If the layer isn't in the website, use url= or urls=.

The layers= parameter accepts a single item ID or multiple item IDs. For multiple layers, use a comma-separated list of IDs (&layers=<itemID>,<itemID>,<itemID>).

For example:,a068913914cd4fecb302b9207a532d1a

The url= parameter accepts a single layer URL.

For example:

Use urls= to include more than one layer. Separate layers with a comma. The map extent is based on the last layer in the list or the slowest one to load. To zoom to a specific extent, include the extent= parameter.

For example:,,6,12&extent=5,45,10,50

As of ArcGIS 10.5, you can use the ?layers operation on a feature service.

For example:,2

Define the scale level and center the map

Scale is automatically set for a map in Map Viewer when you use the webmap or find parameter. If you use the webmap parameter, the map is automatically zoomed to the full extent of the map, unless other URL parameters such as level and center or extent are used to override the web map scale. If you use the find parameter, the map is automatically zoomed to the best extent of the found location.

To define a specific scale level, use the center and level parameters. The level parameter accepts the level ID of the cache scale as listed in the REST service endpoint of the tiled basemap. The resolution is inversely related to the scale. The level parameter is only supported for tiled basemaps, not for basemaps created from dynamic map services and other nontiled data.

To center the map at a particular location, set center using geographic coordinates (x,y) or projected coordinates (x,y,WKID). You can use commas or semicolons as separators. Use semicolons if your numbers use colons as their decimals.


The level and center parameters must be used together. The level parameter is ignored if it's used on its own.

Geographic coordinates example:,45&level=4

Projected coordinates example:,5500000,102100&level=4

Define the extent

To define the extent of the map, use extent to define the extent of the map. The extent parameter accepts geographic coordinates (GCS) as MinX,MinY,MaxX,MaxY or projected coordinates (PCS) as MinX,MinY,MaxX,MaxY,WKID. You can use commas or semicolons as separators. Use semicolons if your numbers use colons as their decimals.

Geographic coordinates example:,34.055,-117.19,34.06

Projected coordinates example:,3959110.38566837,-12918205.318785,4086639.70193162,102113

Set the layer visibility

To set the visibility of layers in the map, use layers=show:.

For example:,2

Find a location or feature to open the map

To find a location or feature that is used to open the map, use find. The map is automatically zoomed to the closest match and a callout marker is added to the map. The find parameter accepts single-line addresses, partial addresses (such as city only or country only), place-names, and longitude-latitude coordinates.

The following example uses a single-line address. new york st,redlands,ca

Add a point

To add a point to the map, use marker=<x>,<y>. The point is added to a new map notes layer at the specified x,y location. You can also include the following optional properties:

  • <wkid>—Spatial reference of the x,y coordinates added to the map. If you do not include a WKID, GCS coordinates are used.
  • <encoded title>—Title of the point pop-up. If you do not include a title, the pop-up will be empty.
  • <encoded icon URL>—Symbol for the point. If you do not include a symbol, a blue marker symbol is used.
  • <encoded label>—Label next to the point symbol.


Keep the following in mind when adding a point to the map:

  • <x>,<y> are required.
  • Be sure to encode the title, icon, and label parameters.
  • You must add properties in this order: marker=<x>,<y>,<wkid>,<encoded title>,<encoded icon URL>,<encoded label>.
  • You can use commas or semicolons as separators. Use semicolons if your numbers use colons as their decimals.
  • Use empty values. Do not use spaces. For example, if you want to specify a label and none of the other optional properties, add the label as the sixth parameter with empty values for the others (x;y;;;;label).
  • If you want the map to zoom in (in addition to centering on the point), include the level parameter.
  • You can edit and save the map notes layer as a map or item.
  • Organizational accounts can use the point to get directions and perform analysis.


The following example uses semicolon separators:;38.147884;;Race start and finish;;Grindstone 100 Ultra Marathon&level=7

Hide the Details pane

To hide the Details pane of Map Viewer, use mapOnly=true.

For example: