I just started creating a very simple mobile GIS app using ArcGIS JavaScript API, and I am experiencing a very peculiar issue.
When the app loads, the basemap is white (not visible) until you use the zoom control. After that, the app works except for the BasemapToggle control. I was using another similar post as a template to add a custom basemap to the BasemapToggle control seen here:
How to Use Custom Basemaps with BasemapToggle widget?
There are no errors reporting, so I am not sure what is causing both the fault basemap load and the BasemapToggle issue.
Has anyone else experienced this and have information on resolving the issue?
1 Answer 1
Change the value you're passing for basemap
in the BasemapToggle
constructor from:
basemap: 'Local',
to:
basemap: 'local'
(i.e. a lowercase 'L'). Then it'll render right off the bat. I think the value has to match exactly with the thing you put into esriConfig.defaults.map.basemaps
.
Explore related questions
See similar questions with these tags.