In this example, I’m using the new Firefly Basemap created by John Nelson at Esri. This new basemap, along with some great techniques he has blogged about demonstrate some pretty cool custom mapping options.
Normal Esri Basemap Snippet
Custom Basemap Snippet
Remember to load your requires and functions before!
The steps above will allow you to control and style your layers individually in your code, but you could definitely add the basemap and layers in an AGOL map and reference the
id using this sample.