Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

wmzoom

Set or obtain zoom level of web map

Syntax

wmzoom(zoomLevel)
wmzoom(wm,zoomLevel)
zoomLevelOut = wmzoom()
zoomLevelOut = wmzoom(wm)

Description

example

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.

example

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

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

Examples

collapse all

Create a web map at default zoom level.

zoomLevel = wmzoom()
zoomLevel =

     0

Zoom in and center the web map at the specified latitude and longitude (London).

wmzoom(10)
wmcenter(51.52, 0)

Create two web maps.

wm1 = webmap;
wm2 = webmap('worldtopographic');

Zoom in and center both maps at a specified latitude and longitude (Paris).

lat = 48.821; 
lon = 1.9391;
zoomLevel = 10;

wmzoom(wm1, zoomLevel)
wmcenter(wm1, lat, lon)
wmzoom(wm2, zoomLevel)
wmcenter(wm2, lat, lon) 

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.

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.

Introduced in R2013b

Was this topic helpful?