Adding a basemap using WebTiledLayer
See original GitHub issueHi,
I was trying to add a basemap with TMS from Nearmap, to call this TMS have to use WebTiledLayer instead of BasemapLayer. Some reason BasemapLayer brings only zoom level up to 19 but it works fine with WebTiledLayer.
define([ "esri/layers/WebTiledLayer", 'esri/dijit/Basemap', 'esri/dijit/BasemapLayer' ], function ( WebTiledLayer,Basemap, BasemapLayer ) { return {
nearMap: { title: 'Nearmap', basemap: new Basemap({ id: 'nearMap', layers: [new WebTiledLayer({ url: "https://us${subDomain}.nearmap.com/maps?x=${col}&y=${row}&z=${level}&nml=v&ticket=ticket&httpauth=false&version=2", copyright: "Nearmap, 2016", id: "nearMap", subDomains: ["0", "1", "2", "3"], minScale:19, maxScale:21 }),
but it didn’t work
init.js:152 GET https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json net::ERR_NAME_NOT_RESOLVED
q {message: “Unable to load https://services.arcgisonline.com/A…vices/World_Street_Map/MapServer?f=json status: 0”, response: Object, status: 0, responseText: “”, xhr: XMLHttpRequest…}
How can I add a basemap using WebTiledLayer?
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (12 by maintainers)
@jkyoungchoi @rylincoln got it. For reference and for others reading this, the secret sauce is the newer version of the Esri API included in the develop branch. You need to use at least version 3.16 of the API for this to work.
I misread comment, it works on dev. one! Thanks