setZoomLevel

fun setZoomLevel(zoomLevel: Int, duration: Int = 0, xy: Xy? = null): Int

Sets a new zoom level centered on the specified screen position. This may be between 0 and maxZoomLevel.

Return

Returns the previous zoom level

Parameters

xy

Screen coordinates under which map should keep position. The coordinates are relative to view parent screen.

zoomLevel

Zoom level.

duration

The animation duration in milliseconds (0 means no animation)