I have imagery dating back 20 years or so that I need to add to my Basemap Gallery widget in a v4.3 map. Has anyone figured out how to add these custom basemap layers to the widget in this version of the APi?
Here's an example of one of the layers I'd like to add to the Basemap Gallery.
var mapbox = new WebTileLayer({
urlTemplate: "https://api.mapbox.com/styles/v1/mapbox/streets-v10/tiles/256/{level}/{col}/{row}"
});
var mapboxBasemap = new Basemap({
baseLayers: [mapbox],
title: "Mapbox",
id: "mapbox",
thumbnailUrl: "includes/images/mapbox.PNG"
});
This is how I have the Basemap Gallery widget styled right now. I'm using an Expand on it, so it may look different than the normal widget layout.
var basemapGallery = new BasemapGallery({
view: view,
container: document.createElement("div")
});
var basemapGalleryExpand = new Expand({
view: view,
content: basemapGallery.domNode,
expandIconClass: "esri-icon-basemap"
});
view.ui.add(basemapGalleryExpand, {
position: "top-right"
});
Also, does anyone known the line to hide the default ArcGIS Basemaps in the widget? The old line doesn't/didn't work in this version of the API. (Below is the old line of code that used to hide the default basemaps.)
showArcGISBasemaps: false,