Create a web map

Web map of Santa Monica trails created in Map Viewer and displayed in a custom application

What is a web map?

A web map is an item in a portal that contains the properties and settings for a map. The item includes properties such as the initial map extent, basemap, data layers, and all styling configurations. To create and save a web map you use Map Viewer or ArcGIS Pro. These tools allow you to interactively design and configure a map. After creating a web map, you can use it to build custom mapping applications or low-code/no-code applications.

You use a web map when you want to:

  • Create a map that you can share with other users and applications.
  • Interactively design and style layers in a map.
  • Configure popups for data layers in a map.
  • Display a map in an application built with ArcGIS Maps SDKs.
  • Securely store and access a map in a portal.
  • Remotely configure a map at any time to change your application.

Web map configuration

You can create and configure how a web map will be visualized. Some of the key types of configurations you can make to a web map include following:

ConfigurationDescription
Initial extentSet the starting location and zoom level for the map.
BasemapSet the basemap style such as streets, navigation, light gray, or satellite imagery.
Data layersAdd hosted layers to display features on the basemap.
Style data layersSet the symbol color and renderers used to style hosted layers.
Style popupsSet the presentation of the data and information when users click on data layers in the map.

How to create a web map

The general steps for publish an item:

1. Set the basemap layer

A basemap, also known as a basemap layer, is a layer that provides the overall visual context for a map or scene. It typically contains geographic features and labels for continents, lakes, administrative boundaries, streets, cities, and places.

To create a new web map, you can use Map Viewer or ArcGIS Pro. These tools allow you to design and configure a map interactively and then save it in a portal.

2. Add data layers

To display data in a web map, you can add hosted feature layers in the Map Viewer or feature layers in ArcGIS Pro.

3. Save the web map

After you create a web map, you can save it. Saving the map will create a new item and you can access the map in an application. You can also set the security of the item to the appropriate sharing level.

Code examples

Create a new web map

An example that demonstrates how to create a web map and add a feature layer to it:

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
Expand
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
        const webMap = new WebMap({
          portalItem: {
            id: "e691172598f04ea8881cd2a4adaa45ba" // Existing web map
          }
        });

        const featureLayer = new FeatureLayer({
          url: "https://services.arcgis.com/example/arcgis/rest/services/ExampleFeatureLayer/FeatureServer/0"
        });

        webMap.add(featureLayer);
Expand

Tutorials

Import data to create a feature layer

Use data management tools to import files and create a feature layer in a feature service.


Define a new feature layer

Use data management tools to define and create a new empty feature layer in a feature service.


Manage a feature layer

Use a hosted feature layer item to set the properties and settings of a feature layer in a feature service.


Create a vector tile service

Use data management tools to create a new vector tile service from a feature service.


Create a map tile service

Use ArcGIS Online or scripting APIs to publish a map tile service.


Services

API support

SearchItemsUsersGroupsSettingsSecurity
ArcGIS Maps SDK for JavaScript1111
ArcGIS Maps SDK for .NET1111
ArcGIS Maps SDK for Kotlin1111
ArcGIS Maps SDK for Swift1111
ArcGIS Maps SDK for Java1111
ArcGIS Maps SDK for Qt1111
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet222222
MapLibre GL JS222222
OpenLayers222222
Full supportPartial supportNo support
  • 1. Limited operations, use HTTP requests.
  • 2. Access via ArcGIS REST JS.

Tools

Use tools to access the portal and create and manage content for applications.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.