AnsweredAssumed Answered

Using map.setBasemap(); for web tiled layers

Question asked by RWinter85 on Aug 10, 2015
Latest reply on Aug 11, 2015 by RWinter85

I am just curious if it is possible to use web tile layers such as stamen or mapbox through:



I know I can do something like this to get it to recognize me calling map.setBasemap('myBasemap'):


esri.basemaps['myBasemap'] = {
  baseMapLayers: [{
    url: 'http://{subDomain}{level}/{col}/{row}.jpg'
  title: 'My Layer'


but the problem with this is it obviously wont treat the url as a tiled layer and ends up looking for something like the following:


Is there a good way to get the map to recognize tiled layers this way?


I am trying to avoid adding this as a web tiled layer on top of a basemap as I would like to add this to a custom basemap gallery and to be able to use this layer the same way as other basemaps via map.setBasemap().