Increase maximum zoom level for a WebTiledLayer

1579
4
09-15-2014 12:33 AM
MathynBuiteveld
New Contributor

I am using a WebTiledLayer to render a custom WMTS source. The WMTS I am using has zoom levels going from 18 to 21, however I cannot zoom in further than what appears to be zoom level 19. Does anyone know how to increase the maximum zoom level for a WebTiledLayer?

0 Kudos
4 Replies
KenBuja
MVP Esteemed Contributor

The basemaps used in in the map generally define how many levels of detail (LODs) that are available. It looks like the maximum for the Esri basemaps is 19. You can specify additional LODs in the map constructor‌. You will have to specify all the LODs you'll need in your map and make sure they match those in the WebTiledLayer that you're using.

Here's an example where I use a selected set of LODs.

map = new Map("divMap", {

  basemap: "osm"

  lods: [

          { "level": 0, "scale": 144447.638572, "resolution": 38.2185141425366 },

          { "level": 1, "scale": 72223.819286, "resolution": 19.1092570712683 },

          { "level": 2, "scale": 36111.909643, "resolution": 9.55462853563415 },

          { "level": 3, "scale": 18055.954822, "resolution": 4.77731426794937 },

          { "level": 4, "scale": 9027.977411, "resolution": 2.38865713397468 },

          { "level": 5, "scale": 4513.988705, "resolution": 1.19432856685505 },

          { "level": 6, "scale": 2256.994353, "resolution": 0.597164283559817 },

          { "level": 7, "scale": 1128.497176, "resolution": 0.298582141647617 }

        ],

  logo: false,

  showAttribution: false

});

0 Kudos
MathynBuiteveld
New Contributor

Thank you for your reply Ken. My code for the map creation now looks like this:

map = new Map("map", {

        center: new Point([4.4809346357564985, 51.92087577611635], new SpatialReference({wkid: 4326})),

        zoom: 18,

        basemap: "osm",

        lods: [

             {"level": 18, "scale": 2132.729583849784 / 1, "resolution": 0.5971642833948136 / 1},

             {"level": 19, "scale": 2132.729583849784 / 2, "resolution": 0.5971642833948136 / 2},

             {"level": 20, "scale": 2132.729583849784 / 4, "resolution": 0.5971642833948136 / 4},

             {"level": 21, "scale": 2132.729583849784 / 8, "resolution": 0.5971642833948136 / 8}

        ]

});

This results in nothing being drawn. Do you know if I made any mistakes?

0 Kudos
KenBuja
MVP Esteemed Contributor

You should put the actual numbers in the scale and resolution that are in the Tile Info section of your map service page. Can you post what they are?

lod.png

0 Kudos
MathynBuiteveld
New Contributor

Hello Ken, I cannot see the information you posted because I am using a custom WMTS which does not display tile info. I can do a GetCapabilities request and see the various scales for various zoom levels but I cannot see the resolution. Do you have more information about the resolution property?

0 Kudos