New Error exposed in 3.18 for Basemap Gallery

3118
13
Jump to solution
09-23-2016 04:08 PM
DEWright_CA
Occasional Contributor III

With the update to reference 3.18 we are now finding that we get this message returned:

esri.dijit.BasemapGallery: Unable to switch basemap because new basemap has a different spatial reference.

Yet if we select our Basemap toggle we can switch without issue; the problem only happens on the initial load of the page. 

13 Replies
DEWright_CA
Occasional Contributor III

In our instance we are using custom basemaps that reflect our states boundaries and needs. When I add that property; I get this error returned to me:

Map.setBasemap: Unable to find basemap definition for: "streetBasemap". Try one of these: streets,satellite,hybrid,terrain,topo,gray,dark-gray,oceans,national-geographic,osm,dark-gray-vector,gray-vector,streets-vector,topo-vector,streets-night-vector,streets-relief-vector,streets-navigation-vector.

Is this dependent on the Title ("Streets") of the map; or the name of the basemap-object I created when instantiating my gallery as defined in JavaScript?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

David,

   You must use one of the contant names as indicated by the message: basemap: "streets"

0 Kudos
JeffJacobson
Occasional Contributor III

You'll need to add your custom basemap to the esri/basemaps list before creating the esri/Map object.

0 Kudos
prashantnigam
New Contributor II

Is this issue resolved?? I am still unable to set the Image service as basemap. I am not using esri-basemaps and using custom basemaps through basemap gallery.

0 Kudos