Basemap worldview

Explore in the sandbox

This sample shows how to define a worldview on your basemap. Setting a worldview displays country boundaries and labels based on a specific view of a country. Worldviews can only be specified for arcgis basemap styles (OSM is not supported).

Worldviews can be set using the BasemapStyle class, which defines the style of the basemap from the basemap style service (v2).

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
// Display the Community basemap with the United States worldview
const basemap = new Basemap({
  style: new BasemapStyle({
    id: "arcgis/community",
    worldview: "unitedStatesOfAmerica"
  })
});

The map on the left displays the basemap with the default worldview. Use the dropdown in the top right of the sample to explore the different available worldviews in the map on the right.

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