2

I have a very basic example for a map: (JsFiddle)

require(["esri/map"],
    function(Map) {
        var baseMap = new Map("map", {
            basemap: "terrain",
            center: [10, 51],
            zoom: 12,
            maxZoom: 22
        });
    });

When I exceed a certain zoom level I am receiving the following error:

init.js:587 Uncaught TypeError: Cannot read property 'resolution' of undefined
at Object.__getExtentForLevel (init.js:587)
at Object._extentUtil (init.js:579)
at Object._wheelZoom (init.js:1254)
at Object.<anonymous> (init.js:63)
at Object.c [as onMouseWheel] (init.js:119)
at Object._fire (init.js:1279)
at Object._onMouseWheelHandler (init.js:1286)
at HTMLDivElement.<anonymous> (init.js:63)

A couple of other applications hosted internally using the same code (but based on 3.13) are able to zoom in until one can see all street names and house numbers.

What is causing these errors?

Marco
  • 22,856
  • 9
  • 75
  • 124

1 Answers1

1

It looks like the "terrain" basemaps' resolution is not as high as one could wish for as an end user and ESRI forgot to limit the zooming capability on that basemap.

Switching to osm, topo or streets resolves the issue.

The solution is to change basemap: "terrain", to basemap: "topo",.

Marco
  • 22,856
  • 9
  • 75
  • 124