Custom Basemap: Supported Types of Portal Items

228
1
07-14-2021 03:16 PM
ZianChoy
Occasional Contributor

I recently learned that although WMTS layers are supported in the JS API, I can't use them as a basemap layer.

Is there an authoritative list of what sorts of layers and Portal/AGOL items can be used as a basemap layer?

I had hoped to use my own layers & AGS map services but now it seems like a bad idea.

The Basemap class's documentation says:

Basemaps can be created from a PortalItem, from a well known basemap ID, or can be used for creating custom basemaps. These basemaps may be created from tiled services you publish to your own server, or from tiled services published by third parties.

Tags (1)
0 Kudos
1 Reply
ReneRubalcava
Frequent Contributor II

You can use WMTS as a basemap, either in baseLayers or referenceLayers.

https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers

The doc has some snippets on how it works.

Here is a sample using WMTS as basemap baseLayers

https://codepen.io/odoe/pen/ExmWLJo?editors=1000