NativeParams class
Settings that only native maps have, for MapOptions.nativeParams.
Everything flutter_map can express stays on flutter_map's own API (MapOptions, InteractionOptions, the
layers); this class holds the extras of the native SDKs. The flutter_map backend (web, Windows, Linux, tests)
ignores it entirely, so code written for flutter_map keeps the same meaning there.
Every field is nullable: null means the platform default (given in each field's doc). A field of android or apple refines the shared field it overrides. A shared field exists only when both SDKs implement it with the same meaning.
- Annotations
Constructors
- NativeParams({MapStyle? mapType, bool? showsUserLocation, bool? showsCompass, bool? showsBuildings, bool? showsTraffic, bool? showsPointsOfInterest, bool? tiltGestures, EdgeInsets? padding, AndroidMapParams? android, AppleMapParams? apple})
-
const
Properties
- android → AndroidMapParams?
-
Google Maps only (Android).
final
- apple → AppleMapParams?
-
MapKit only (iOS and macOS).
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- mapType → MapStyle?
-
Base map type. Default MapStyle.standard. Overridden by AndroidMapParams.mapType /
AppleMapParams.mapType.
final
- padding → EdgeInsets?
-
Inset of the native user interface: logo, legal notice, compass, my-location button. Default zero. Google
setPadding, MapKit layout margins. The camera is not shifted:MapCamera.centerstays the center of the map widget, as in flutter_map (the core compensates the shift both SDKs apply to their camera target).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showsBuildings → bool?
-
3D buildings. Default false. Google
isBuildingsEnabled, MapKitshowsBuildings.final - showsCompass → bool?
-
The platform's compass, shown while the map is rotated. Default false. Google
uiSettings.isCompassEnabled, MapKitshowsCompass.final - showsPointsOfInterest → bool?
-
Points of interest of the base map (shops, landmarks). Default true. Google: the backend's POI style rule;
MapKit
pointOfInterestFilter(refined by AppleMapParams.pointsOfInterest).final - showsTraffic → bool?
-
Traffic. Default false. Google
isTrafficEnabled, MapKitMKStandardMapConfiguration.showsTraffic.final - showsUserLocation → bool?
-
The platform's user location dot (needs the location permission). Default false. Google
isMyLocationEnabled, MapKitshowsUserLocation.final - tiltGestures → bool?
-
Two-finger tilt. Default false. Google
uiSettings.isTiltGesturesEnabled, MapKitisPitchEnabled. A tilted camera makes the Dart projections ofMapCamera(hit tests,latLngToScreenOffset, widgets placed over the map) wrong, because flutter_map's camera has no tilt.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override