I have a web map that I load from its portal id and after it loads I create a basemapGallery. The basemap gallery shows up correctly but any time I choose a different basemap, the basemap for the map goes blank/white background and only the graphics appear on the map. Any idea why?
var webmap = new WebMap({ portalItem: { id: "xxxx" }});
webMapView = new MapView({ container: "MapDiv", map: webmap, center: [lat, long], zoom: zoom});
var basemapGallery = new BasemapGallery({ view: webMapView, container: document.createElement("div") });
var bgExpand = new Expand({
view: webMapView,
content: basemapGallery.container,
expandIconClass: "esri-icon-basemap"
});
webMapView.ui.add(bgExpand, { position: "top-left" });
Mathew,
Sounds like you Web Maps basemap is in a different spatial then the standard esri base maps which are WKID 102100. All the basmeps that particupate in the BaseMap Gallery have to be in the same WKID.
Is there a way for me to change the spatial for the web map when its loaded?
Mathew,
No the web maps basemap itself has to be 102100 for it to be used in conjunction with esri basemaps.