pixelScale property - MapViewBase class - mapview library - Dart API
pixelScale property
The pixel scale factor used by this MapView.
Pixel scale is 0.0 if the map view is not initialized.
In cases where the MapView moves in between screens (e.g. from main screen to a CarPlay screen),
/ the most up-to-date pixel scale value can be obtained after a render target gets attached to the view.
/ To get notified when a render target gets attached to the MapView, see MapViewLifecycleListener.
It is used to support screen resolution and size independence.
This value is a derivative of the device's screen pixel density and is a direct analog of
devicePixelRatio from FlutterView, ViewConfiguration or MediaQueryData. It can be used to translate between physical pixels and
logical pixels according to the formula:
logicalPixels = pixels / pixelScale.
Gets the pixel scale factor used by this MapView.
Implementation
double get pixelScale;