zoomLevel property

double zoomLevel

Current zoom level of the map layer.

Defaults to 1.

The default zoomLevel value is 1 which will show the whole map in the viewport for MapShapeLayer and the available bounds for the MapTileLayer based on the focalLatLng (Please check the documentation of MapTileLayer to know more details about how zoomLevel works in it).

You can also get the current zoom level after interaction using the zoomLevel property.


double get zoomLevel => _zoomLevel;
void zoomLevel=(double value)


set zoomLevel(double value) {
  assert(value >= kDefaultMinZoomLevel);
  assert(value >= minZoomLevel && value <= maxZoomLevel);
  if (_zoomLevel == value || value < minZoomLevel || value > maxZoomLevel) {

  _zoomLevel = value;
  if (_controller != null && _controller!.layerType == LayerType.shape) {

  if (_zoomController!.parentRect != null) {
    _zoomController!.zoomLevel = value;
    // Intimating the zoom controller to update the actual rect based on the
    // new zoom level. This gets works only when there is simultaneous
    // zoom pan property changes has been performed.