I want to construct a BasemapGallery from a collection of Basemap. In the API reference does not provide a link to "well known Ids"; my internet search for "basemap well known id" comes up empty. So what are these "well known" ids?
From the ESRI API Reference for Basemap
// or create the basemap from a well known ID
Basemap.fromId("topo");
Good health!
Blair
Solved! Go to Solution.
Blair,
Here they are:
The following are valid options: "streets" , "satellite" , "hybrid", "topo", "gray", "dark-gray", "oceans", "national-geographic", "terrain", "osm", "dark-gray-vector", gray-vector", "streets-vector", "streets-night-vector", "streets-relief-vector", "streets-navigation-vector" and "topo-vector". Property added at v3.3. The "terrain" and "dark-gray" options added at v3.12. The "dark-gray-vector", "gray-vector", "streets-vector", "streets-night-vector", "streets-relief-vector", "streets-navigation-vector" and "topo-vector" options were added at v3.16.
Blair,
Here they are:
The following are valid options: "streets" , "satellite" , "hybrid", "topo", "gray", "dark-gray", "oceans", "national-geographic", "terrain", "osm", "dark-gray-vector", gray-vector", "streets-vector", "streets-night-vector", "streets-relief-vector", "streets-navigation-vector" and "topo-vector". Property added at v3.3. The "terrain" and "dark-gray" options added at v3.12. The "dark-gray-vector", "gray-vector", "streets-vector", "streets-night-vector", "streets-relief-vector", "streets-navigation-vector" and "topo-vector" options were added at v3.16.
You can find them here: Map | API Reference | ArcGIS API for JavaScript 4.7
Thanks Robert and Ken!
The API for Map lists 17, ESRI phrase "well known IDs" is, at best, unfortunate; they could have easily pointed to the map API.
I would like to mark both answers as "correct"; I chose Robert's because he was first with an explicit answer. I did mark Ken's "Helpful".
Now to make the rendered widget useful with features like resizable and draggable and sortable (jQuery UI).
Good health!
Blair
Blair,
Ken's link is for the 4.x API and my list is from 3.x API. Not sure which you are using.
The documentation indirectly links to the well-known IDs. From the Basemap page, click on the link "basemap ID" in the line
Basemaps can be created from a PortalItem, from a well known basemap ID, or can be used for creating custom basemaps.
which takes you to the fromID method. In that description is the line
See Map.basemap for a list of possible values.
That takes you to the list of well-known IDs. Granted, it should be done directly in the code snippet that you showed.