Hello I'm trying to update my basemap from "streets" to "streets-vector" since "streets" is deprecated. I thought it would be a simple change but I have issues when switching to a vector map.
My current code is:
let map = new Map ({
basemap: "streets"
});
When I change "streets" to "streets-vector" I expect it to work but the map does not show that basemap. Any help would be much appreciated, thanks.
Hi @tryingtolearn9 -
You should be able to just change the basemap string to "streets-vector". Here's a sample showing it working in a simple map: https://codepen.io/laurenb14/pen/OJzgGwz?editors=1000
Are there any errors in the browser console? If there is a typo or a space added to the basemap string, that could cause the basemap to not display.
That should be all that you would need to do. Are you using a 4.x version of the Javascript API? Maybe try "topo-vector", or "streets-relief-vector" to see if you can see any of the vector basemaps.
I tested with other vector maps and for some reason all of them don't work for me, but the non-vector maps work though so I feel like we're narrowing the problem down. In my package.json I have "@arcgis/core": "^4.22.2" as a dependency.