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:
Configuration | Description |
---|---|
Initial extent | Set the starting location and zoom level for the map. |
Basemap | Set the basemap style such as streets, navigation, light gray, or satellite imagery. |
Data layers | Add hosted layers to display features on the basemap. |
Style data layers | Set the symbol color and renderers used to style hosted layers. |
Style popups | Set 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:
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);
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
- 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.