Map zoom

From Sim Innovations Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

map_zoom(map_id,zoom)

map_zoom is used to set to change the zoom level of a map.

Return value

This function won't return any value.

Arguments

# Argument Type Description
1 map_id Number Map identifier. This number can be obtained by calling map_add.
2 zoom Number The openstreemap zoom level. This value can normally range from 1 (whole earth) to 16 (closest to earth). This value is dependent on the base layer source type defined above.

Example

-- Place a map to your instrument using the openstreetmap cycle map and zoom level of 10
id = map_add(0,0,500,500,"OSM_CYCLE", 10)

-- Nah, lets use zoom level 12, much nicer..
map_zoom(id, 12)