AnsweredAssumed Answered

esri/basemap baseLayers collection

Question asked by MikeTownshend on Feb 15, 2017
Latest reply on Feb 15, 2017 by MikeTownshend

I am in the process of building a custom web app that I have working properly using the JSAPI v 3.19. This is my first experience with the 4.2 version.  I can not find examples of how to properly build a new Basemap in the 4.2 docs.

When I replace the reference to customBaseMap in the Map object with "hybrid" it works fine as it is using a basemap from AGOL.  When I reference customeBaseMap in the Map object I get a blank map.  When I use FireBug or the IE Developer tools I get no error.  Attached is the full code.  Below is a snip of the JS:


Map, MapView,Basemap
) {

var imageURL = "";
var labelURL = "";

var customBasemap = new Basemap({
baseLayers: [
{ url: imageURL },
{ url: labelURL }
title: "Satellite",
id: "myMap"

var map = new Map({
basemap: customBasemap

var view = new MapView({
container: "viewDiv",
map: map,
extent: { 
xmin: -8444782,
ymin: 4634522,
xmax: -8360273,
ymax: 4853595,
spatialReference: 102100




Has anyone run into this before or know if some solid documentation on how to build a collection of custom basemaps?