ArcGIS has updated how they define basemaps. They have a new basemap rest service https://developers.arcgis.com/rest/basemap-styles/ that defines the "default" basemaps hosted by Esri with the following JS code:
To keep up with ArcGIS, and actually make discoverability simpler in GeoBlazor, I'm creating an enum that has the entire list of style ids. I chose to call them Name in GeoBlazor, since that seems to make more sense for a string/enum.
ArcGIS has updated how they define basemaps. They have a new basemap rest service https://developers.arcgis.com/rest/basemap-styles/ that defines the "default" basemaps hosted by Esri with the following JS code:
This looks like it will eventually replace being able to set
view.map.basemap
directly to a string value, and the old strings are marked aslegacy
here https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap.To keep up with ArcGIS, and actually make discoverability simpler in GeoBlazor, I'm creating an
enum
that has the entire list of styleid
s. I chose to call themName
in GeoBlazor, since that seems to make more sense for a string/enum.Here is the implementation in GeoBlazor:
I have also
Map.ArcGISDefaultBasemap
asObsolete
, but not deleting, for a smoother transition.Basemaps
sample to allow users to test out the new styles enum with a select dropdown.