zoom Number (default: 3)

The initial zoom level.

Typical web maps use zoom levels from 0 (whole world) to 19 (sub-meter features).

The map size is derived from the zoom level and minScale options: size = (2 ^ zoom) * minSize

Map zoom rounds floating point numbers. This is done so as the majority of web maps use the whole zoom levels 0 through to 19.

Example - setting initial zoom level

<div id="map"></div>
        layers: [{
            type: "tile",
            urlTemplate: "http://a.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png",
            attribution: "&copy; OpenStreetMap"
        center: [32.7758, -96.7966],
        zoom: 9
In this article