OpenMapOptions class

Allows you to provide your map's starting properties for zoom, rotation and center. Alternatively you can provide bounds instead of center. If both, center and bounds are provided, bounds will take preference over center. Zoom, pan boundary and interactivity constraints can be specified here too.

Callbacks for onTap, onLongPress and onPositionChanged can be registered here.

Through crs the Coordinate Reference System can be defined, it defaults to Epsg3857.

Checks if a coordinate is outside of the map's defined boundaries.

If you download offline tiles dynamically, you can set adaptiveBoundaries to true (make sure to pass screenSize and an external controller), which will enforce panning/zooming to ensure there is never a need to display tiles outside the boundaries set by swPanBoundary and nePanBoundary.

Constructors

OpenMapOptions({Crs? crs, double? zoom, double? rotation, bool? debugMultiFingerGestureWinner, bool? enableMultiFingerGestureRace, double? rotationThreshold, int? rotationWinGestures, double? pinchZoomThreshold, int? pinchZoomWinGestures, double? pinchMoveThreshold, int? pinchMoveWinGestures, bool? enableScrollWheel, double? minZoom, double? maxZoom, int? interactiveFlags, LatLngBounds? maxBounds, bool? keepAlive, LongPressCallback? onLongPress, PositionCallback? onPositionChanged, bool? slideOnBoundaries, Size? screenSize, bool? adaptiveBoundaries, LatLng? center, LatLng? swPanBoundary, LatLng? nePanBoundary})
OpenMapOptions.bounds({Crs? crs, double? zoom, double? rotation, bool? debugMultiFingerGestureWinner, bool? enableMultiFingerGestureRace, double? rotationThreshold, int? rotationWinGestures, double? pinchZoomThreshold, int? pinchZoomWinGestures, double? pinchMoveThreshold, int? pinchMoveWinGestures, bool? enableScrollWheel, double? minZoom, double? maxZoom, int? interactiveFlags, LatLngBounds? maxBounds, bool? keepAlive, LongPressCallback? onLongPress, PositionCallback? onPositionChanged, bool? slideOnBoundaries, Size? screenSize, bool? adaptiveBoundaries, required LatLngBounds bounds, FitBoundsOptions? boundsOptions, LatLng? swPanBoundary, LatLng? nePanBoundary})

Properties

adaptiveBoundaries bool?
final
bounds LatLngBounds?
no setter
boundsOptions FitBoundsOptions?
no setter
center LatLng?
no setter
crs Crs?
final
debugMultiFingerGestureWinner bool?
Prints multi finger gesture winner Helps to fine adjust rotationThreshold and pinchZoomThreshold and pinchMoveThreshold Note: only takes effect if enableMultiFingerGestureRace is true
final
enableMultiFingerGestureRace bool?
If true then rotationThreshold and pinchZoomThreshold and pinchMoveThreshold will race If multiple gestures win at the same time then precedence: pinchZoomWinGestures > rotationWinGestures > pinchMoveWinGestures
final
enableScrollWheel bool?
If true then the map will scroll when the user uses the scroll wheel on his mouse. This is supported on web and desktop, but might also work well on Android. A Listener is used to capture the onPointerSignal events.
final
hashCode int
The hash code for this object.
no setterinherited
interactiveFlags int?
see InteractiveFlag for custom settings
final
keepAlive bool?
final
maxBounds LatLngBounds?
final
maxZoom double?
final
minZoom double?
final
nePanBoundary LatLng?
final
onLongPress LongPressCallback?
final
onPositionChanged PositionCallback?
final
pinchMoveThreshold double?
Pinch Move threshold default is 40.0 (note: this doesn't take any effect on drag) Map starts to move when pinchMoveThreshold has been achieved or another multi finger gesture wins which allows MultiFingerGesture.pinchMove Note: if interactiveFlags doesn't contain InteractiveFlag.pinchMove or enableMultiFingerGestureRace is false then pinch move cannot win
final
pinchMoveWinGestures int?
When pinchMoveThreshold wins over rotationThreshold and pinchZoomThreshold then pinchMoveWinGestures gestures will be used. By default MultiFingerGesture.pinchMove and MultiFingerGesture.pinchZoom gestures will take effect see MultiFingerGesture for custom settings
final
pinchZoomThreshold double?
Pinch Zoom threshold default is 0.5 Map starts to zoom when pinchZoomThreshold has been achieved or another multi finger gesture wins which allows MultiFingerGesture.pinchZoom Note: if interactiveFlags doesn't contain InteractiveFlag.pinchZoom or enableMultiFingerGestureRace is false then zoom cannot win
final
pinchZoomWinGestures int?
When pinchZoomThreshold wins over rotationThreshold and pinchMoveThreshold then pinchZoomWinGestures gestures will be used. By default MultiFingerGesture.pinchZoom and MultiFingerGesture.pinchMove gestures will take effect see MultiFingerGesture for custom settings
final
rotation double?
final
rotationThreshold double?
Rotation threshold in degree default is 20.0 Map starts to rotate when rotationThreshold has been achieved or another multi finger gesture wins which allows MultiFingerGesture.rotate Note: if interactiveFlags doesn't contain InteractiveFlag.rotate or enableMultiFingerGestureRace is false then rotate cannot win
final
rotationWinGestures int?
When rotationThreshold wins over pinchZoomThreshold and pinchMoveThreshold then rotationWinGestures gestures will be used. By default only MultiFingerGesture.rotate gesture will take effect see MultiFingerGesture for custom settings
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenSize Size?
final
slideOnBoundaries bool?
final
swPanBoundary LatLng?
final
zoom double?
final

Methods

copyWith({Crs? crs, double? zoom, double? rotation, bool? debugMultiFingerGestureWinner, bool? enableMultiFingerGestureRace, double? rotationThreshold, int? rotationWinGestures, double? pinchZoomThreshold, int? pinchZoomWinGestures, double? pinchMoveThreshold, int? pinchMoveWinGestures, bool? enableScrollWheel, double? minZoom, double? maxZoom, int? interactiveFlags, LatLngBounds? maxBounds, bool? keepAlive, LongPressCallback? onLongPress, PositionCallback? onPositionChanged, bool? slideOnBoundaries, Size? screenSize, bool? adaptiveBoundaries, LatLng? swPanBoundary, LatLng? nePanBoundary}) OpenMapOptions
copyWithBounds({required LatLngBounds bounds, FitBoundsOptions? boundsOptions, Crs? crs, double? zoom, double? rotation, bool? debugMultiFingerGestureWinner, bool? enableMultiFingerGestureRace, double? rotationThreshold, int? rotationWinGestures, double? pinchZoomThreshold, int? pinchZoomWinGestures, double? pinchMoveThreshold, int? pinchMoveWinGestures, bool? enableScrollWheel, double? minZoom, double? maxZoom, int? interactiveFlags, LatLngBounds? maxBounds, bool? keepAlive, LongPressCallback? onLongPress, PositionCallback? onPositionChanged, bool? slideOnBoundaries, Size? screenSize, bool? adaptiveBoundaries, LatLng? swPanBoundary, LatLng? nePanBoundary}) OpenMapOptions
create({required void onMapReady()?, required TapCallback onTap, OpenMapSettings? settings}) MapOptions
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