Main Content

wmzoom

(To be removed) Set or obtain zoom level of web map

The wmzoom function will be removed in a future release. Use a geographic axes object and the ZoomLevel property of the object instead. For information on updating your code, see Version History.

Description

wmzoom(zoomLevel) specifies the zoom level of the current web map, zoomLevel. If there is no current web map, wmzoom creates a new web map.

example

wmzoom(wm,zoomLevel) specifies the zoom level of the web map, specified by the handle wm.

zoomLevelOut = wmzoom() returns the zoom level of the current web map.

example

zoomLevelOut = wmzoom(wm) returns the zoom level of the web map specified by the handle wm.

Examples

collapse all

Display a marker on a web map.

wmmarker(51,0)

Marker displayed on a web map

Query the zoom level of the current web map.

zoomLevelOut = wmzoom()
zoomLevelOut =

    15

Zoom out by specifying a new zoom level.

wmzoom(10)

Zoomed-out view of the same marker

Input Arguments

collapse all

Zoom level, specified as a scalar numeric integer in the range [0 18].

Data Types: single | double

Web map, specified as a web map handle.1

Output Arguments

collapse all

Zoom level of the current web map, returned as a scalar numeric integer in the range [0 18].

Data Types: single | double

Tips

  • Particular maps may not support every available zoom level. If your map displays as completely white, try another zoom level. The map you are displaying may not support the zoom level you have currently selected. You can also select another base layer, which might support the specified zoom level.

Version History

Introduced in R2013b

collapse all


1 Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®.