MapOptions class Basic

The MapOptions class is used to set default values for the MapLibreMap widget.

Annotations

Constructors

MapOptions({String initStyle = 'https://demotiles.maplibre.org/style.json', double initZoom = 0, Geographic? initCenter, @Deprecated('Renamed to initPitch') double? pitch, double initPitch = 0, double initBearing = 0, double minZoom = 0, double maxZoom = 22, double minPitch = 0, double maxPitch = 60, LngLatBounds? maxBounds, MapGestures gestures = const MapGestures.all(), bool androidTextureMode = true, AndroidPlatformViewMode androidMode = AndroidPlatformViewMode.tlhc_vd, bool androidTranslucentTextureSurface = false, Color androidForegroundLoadColor = Colors.transparent})
Creates a new MapOptions instance. See fields for more information.
const

Properties

androidForegroundLoadColor Color
The MapView foreground color that is used when the map surface is being created.
final
androidMode AndroidPlatformViewMode
The platform view type used on android.
final
androidTextureMode bool
Toggle the texture mode on Android.
final
androidTranslucentTextureSurface bool
Toggle the translucent texture surface mode on Android. This enables textureMode and comes at a significant performance penalty.
final
gestures MapGestures
Enable and disable some or all map gestures.
final
hashCode int
The hash code for this object.
no setterinherited
initBearing double
The initial bearing of the map. Defaults to 0 (north on top). 360 is exactly one loop.
final
initCenter Geographic?
The initial center on the map.
final
initPitch double
The initial pitch level. Minimum is 0 and maximum is 85 on web and 60 on other platforms.
final
initStyle String
A JSON string representing a valid MapLibre style document, or a URL pointing to such a document.
final
initZoom double
The initial zoom level.
final
maxBounds LngLatBounds?
The maximum bounding box of the map camera. No constraints are in place if set to null.
final
maxPitch double
The maximum camera pitch / tilt. Allowed values on web are 0-85. Allowed values on other platforms are 0-60, bigger values will get ignored.
final
maxZoom double
The maximum zoom level. Allowed values are 0-24. Defaults to 22.
final
minPitch double
The minimum camera pitch / tilt. Allowed values on web are 0-85. Allowed values on other platforms are 0-60, bigger values will get ignored.
final
minZoom double
The minimum zoom level. Allowed values are 0-24. Defaults to 0.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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.
inherited

Static Methods

maybeOf(BuildContext context) MapOptions?
Find the MapOptions of the closest MapLibreMap in the widget tree. Returns null if called outside of the MapLibreMap.children.
of(BuildContext context) MapOptions
Find the MapOptions of the closest MapLibreMap in the widget tree. Throws an StateError if called outside of the MapLibreMap.children.