# zoom

return type | undefined
syntax | .geomap( "zoom", Number numberOfLevels )

usage

    $("#map").geomap( "zoom", 1 )
    $("#map").geomap( "zoom", -2 )

The zoom method can zoom the map in or out by a given number of zoom levels. Positive values zoom the map in, negative values zoom the map out.

This method will not zoom out beyond zoom level 0. If you are using a tiling scheme, this method will not zoom in past the maximum number of zoom levels defined in the tilingScheme property.

This method accepts values relative to the map's current zoom level. This is different than the zoom property, which is the map's current zoom level. It might be useful to add an explicit plus sign when using this zoom method.

    // set the map to zoom level 2
    $("#map").geomap( "option", "zoom", 2 );

    // zoom the map in 2 levels from its current zoom
    $("#map").geomap( "zoom", +2 );

This method does not trigger events, not even bboxchange.

There is no default value. Passing null or undefined will not change the map's zoom.