Skip to content

ZoomableCanvasMap

Martín González edited this page May 2, 2016 · 6 revisions

Constructor

ZoomableCanvasMap takes one parameter object with the same properties as StaticCanvasMap. Additionally you can define the following property.

# zoomScale: number (optional)

This should be a number between 0 and 1, it defines how much the map zooms into a polygon. This defaults to 0.5.

zoomScale: 0.5

Class members

ZoomableCanvasMap supports the init and paint functions of StaticCanvasMap. Additionally there is the following function.

# zoom: function(feature) {}

This function zooms into the map using the bounds of the given feature. The zoomScale property defines how much.

map.zoom(feature)
Clone this wiki locally