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).
// 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.