MapOptions class
Map options
Constructors
- MapOptions({Crs crs = CRS.EPSG3857, dynamic center, Size? size, ZoomOptions? zoomOptions, double rotation = rotationDef, bool disableRotation = disableRotationDef, bool showCenterMarker = showCenterMarkerDef, num? centerMarkerSize, dynamic centerMarker = markerDef, bool live = liveDef, bool moveWhenLive = moveWhenLiveDef, bool showLocator = showLocatorDef, Locator? locator, dynamic locationMarker = markerDef, num? locationMarkerSize, bool showLocationMarker = showLocationMarkerDef, bool showLocationIndicator = showLocationIndicatorDef, LocationIndicator? locationIndicator, bool showCompass = showCompassDef, Compass? compass, bool showScale = showScaleDef, Scale? scale, bool interactive = interactiveDef, LatLngBounds? maxBounds, LatLngBounds? fitBounds, FitBoundsOptions? fitBoundsOptions, bool slideOnBoundaries = slideOnBoundariesDef, bool adaptiveBoundaries = adaptiveBoundariesDef, dynamic onTap(LatLng?)?, dynamic onLongPress(LatLng?)?, MapChangedCallback? onChanged, Function? onReady, String attribution = attributionDef, bool hideAttribution = hideAttributionDef})
Properties
- adaptiveBoundaries → bool
-
Is map an adaptive boundaries.
final
- attribution → String
-
Attribution to show in this map.
final
- canRotate → bool
-
Whether rotation of this map is enabled.
no setter
- center → LatLng?
-
Initial geographic center of the map (by latlng position).
final
- centerMarker → dynamic
-
final
- centerMarkerSize → double
-
final
- centerQuery → String?
-
Initial geographic center of the map (by location name).
final
- compass → Compass?
-
To define custom style and position of Compass on the screen.
final
- crs → Crs
-
The
Coordinate Reference System
to use. Don't change this if you're not sure what it means.final - disableRotation → bool
-
Disable gesture rotation on the map.
final
- fitBounds → LatLngBounds?
-
When this options is set, the map will fit to the given bounds.
final
- fitBoundsOptions → FitBoundsOptions
-
Fit bounds options to be used when fitBounds is set to true.
final
- hasCenter → bool
-
Whether center of this map is set.
no setter
- hasCenterQuery → bool
-
Whether center query (address or location name) of this map is set.
no setter
- hasFitBounds → bool
-
Whether fit bounds of this map is set.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasLocationIndicator → bool
-
Whether custom location indicator for this map is set.
no setter
- hasMaxBounds → bool
-
Whether max bounds of this map is set.
no setter
- hasSize → bool
-
Whether map size is already set.
no setter
- hideAttribution → bool
-
Hide attribution of this map.
final
- interactive → bool
-
Whether the map is interactive (can accept Gesture from user).
Set it to
false
when you need static map.final - live → bool
-
Whether the map automatically search for live user's location
final
- locationIndicator → LocationIndicator?
-
To define custom style and position of
LocationIndictor
on the screen.final - locationMarker → dynamic
-
final
- locationMarkerSize → double
-
final
- locator → Locator?
-
To define custom style and position of Locator on the screen.
final
- maxBounds → LatLngBounds?
-
When this option is set, the map restricts the view to the given
geographical bounds, bouncing the user back if the user tries to pan
outside the view.
final
- maxZoom → double
-
Max zoom level of this map.
no setter
- minZoom → double
-
Min zoom level of this map.
no setter
- moveWhenLive → bool
-
final
- noSize → bool
-
Whether map size is not set yet.
no setter
- notLive → bool
-
Whether this map is not live
no setter
- onChanged → MapChangedCallback?
-
Callback function to be called when map state is changed.
final
- onLongPress → (dynamic Function(LatLng?)?)
-
Callback function to be called when long press on this map.
final
- onReady → Function?
-
Callback function to be called when map is ready.
final
- onTap → (dynamic Function(LatLng?)?)
-
Callback function to be called when tap on this map.
final
- rotation → double
-
Initial rotation of the map container.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → Scale?
-
To define custom style and position of Scale on the screen.
final
- showCenterMarker → bool
-
To define whether to show center marker (usually used for static map).
final
- showCompass → bool
-
Whether to show compass to visualize current rotation of the map.
final
- showLocationIndicator → bool
-
Whether to show location indicator at the user's location
when live or locate by locator
final
- showLocationMarker → bool
-
Whether to show location marker at the user's location
when live or locate by locator
final
- showLocator → bool
-
Whether to show locator button to use to search user's location when it's tapped.
final
- showScale → bool
-
Whether to show scale to indicate the current scale on the map.
final
- size → Size?
-
Size of container to show map on the screen.
final
- slideOnBoundaries → bool
-
Is map need to slide on boundaries.
final
- zoom → double
-
Current zoom level of this map.
no setter
- zoomDelta → double
-
Zoom delta of this map.
no setter
- zoomOptions → ZoomOptions
-
Specified ZoomOptions to define zoom, minZoom, maxZoom and zoomDelta
final
Methods
-
copyWith(
{Crs? crs, Size? size, dynamic center, ZoomOptions? zoomOptions, double? rotation, bool? disableRotation, bool? showCenterMarker, num? centerMarkerSize, dynamic centerMarker, bool? live, bool? moveWhenLive, bool? showLocator, Locator? locator, dynamic locationMarker, num? locationMarkerSize, bool? showLocationMarker, bool? showLocationIndicator, LocationIndicator? locationIndicator, bool? showCompass, Compass? compass, bool? showScale, Scale? scale, bool? interactive, LatLngBounds? maxBounds, LatLngBounds? fitBounds, FitBoundsOptions? fitBoundsOptions, bool? slideOnBoundaries, bool? adaptiveBoundaries, dynamic onTap(LatLng?)?, dynamic onLongPress(LatLng?)?, MapChangedCallback? onChanged, Function? onReady, String? attribution, bool? hideAttribution}) → 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