zoomLevel property Null safety

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 >= 1);
  assert(value >= minZoomLevel && value <= maxZoomLevel);
  if (_zoomLevel == value || value < minZoomLevel || value > maxZoomLevel) {
  _zoomLevel = value;