1

I just started creating a very simple mobile GIS app using ArcGIS Javascript API, and I have 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?

I created a JSFiddle to examplify the issue here:

JSFiddle

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?

Any help appreciated!

2

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.

  • Wow, I knew that. I simply overlooked it when reviewing. Thanks! – evv_gis Dec 17 '13 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.