VTMap class
- Inheritance
Constructors
-
VTMap({required CameraPosition initialCameraPosition, String? accessToken, MapCreatedCallback? onMapCreated, OnStyleLoadedCallback? onStyleLoadedCallback, Set<
Factory< ? gestureRecognizers, bool compassEnabled = true, bool logoEnabled = true, CameraTargetBounds cameraTargetBounds = CameraTargetBounds.unbounded, String styleString = 'https://api-maps.viettel.vn/gateway/mapservice/v1/media/style.json', MinMaxZoomPreference minMaxZoomPreference = MinMaxZoomPreference.unbounded, bool rotateGesturesEnabled = true, bool scrollGesturesEnabled = true, bool zoomGesturesEnabled = true, bool tiltGesturesEnabled = true, bool trackCameraPosition = true, bool myLocationEnabled = true, MyLocationTrackingMode myLocationTrackingMode = MyLocationTrackingMode.None, MyLocationRenderMode myLocationRenderMode = MyLocationRenderMode.NORMAL, Point<OneSequenceGestureRecognizer> >num> ? logoViewMargins, CompassViewPosition? compassViewPosition, Point<num> ? compassViewMargins, Point<num> ? attributionButtonMargins, OnMapClickCallback? onMapClick, OnUserLocationUpdated? onUserLocationUpdated, OnMapClickCallback? onMapLongClick, OnCameraTrackingDismissedCallback? onCameraTrackingDismissed, OnCameraTrackingChangedCallback? onCameraTrackingChanged, OnCameraIdleCallback? onCameraIdle, OnMapIdleCallback? onMapIdle, bool gpsControlEnable = true, bool mapTypeControlEnable = false, OnCameraIdleCallback? onCameraMovingStarted}) -
const
Properties
- accessToken → String?
-
If you want to use Mapbox hosted styles and map tiles, you need to provide a Mapbox access token.
Obtain a free access token on your Mapbox account page.
The reccommended way is to use this parameter to set your access token, an alternative way to add your access tokens through external files is described in the plugin's wiki on Github.
final
-
attributionButtonMargins
→ Point<
num> ? -
Set the layout margins for the Mapbox Attribution Buttons
final
- cameraTargetBounds → CameraTargetBounds
-
Geographical bounding box for the camera target.
final
- compassEnabled → bool
-
True if the map should show a compass when rotated.
final
-
compassViewMargins
→ Point<
num> ? -
Set the layout margins for the Mapbox Compass
final
- compassViewPosition → CompassViewPosition?
-
Set the position for the Mapbox Compass
final
-
gestureRecognizers
→ Set<
Factory< ?OneSequenceGestureRecognizer> > -
Which gestures should be consumed by the map.
final
- gpsControlEnable → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialCameraPosition → CameraPosition
-
The initial position of the map's camera.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- logoEnabled → bool
-
final
-
logoViewMargins
→ Point<
num> ? -
Set the layout margins for the Mapbox Logo
final
- mapTypeControlEnable → bool
-
final
- minMaxZoomPreference → MinMaxZoomPreference
-
Preferred bounds for the camera zoom level.
final
- myLocationEnabled → bool
-
True if a "My Location" layer should be shown on the map.
final
- myLocationRenderMode → MyLocationRenderMode
-
The mode to render the user location symbol
final
- myLocationTrackingMode → MyLocationTrackingMode
-
The mode used to let the map's camera follow the device's physical location.
myLocationEnabled
needs to be true for values other thanMyLocationTrackingMode.None
to work.final - onCameraIdle → OnCameraIdleCallback?
-
final
- onCameraMovingStarted → OnCameraIdleCallback?
-
final
- onCameraTrackingChanged → OnCameraTrackingChangedCallback?
-
Called when the location tracking mode changes
final
- onCameraTrackingDismissed → OnCameraTrackingDismissedCallback?
-
Called when the map's camera no longer follows the physical device location, e.g. because the user moved the map
final
- onMapClick → OnMapClickCallback?
-
final
- onMapCreated → MapCreatedCallback?
-
Please note: you should only add annotations (e.g. symbols or circles) after
onStyleLoadedCallback
has been called.final - onMapIdle → OnMapIdleCallback?
-
Called when map view is entering an idle state, and no more drawing will
be necessary until new data is loaded or there is some interaction with
the map.
final
- onMapLongClick → OnMapClickCallback?
-
final
- onStyleLoadedCallback → OnStyleLoadedCallback?
-
Called when the map style has been successfully loaded and the annotation managers have been enabled.
Please note: you should only add annotations (e.g. symbols or circles) after this callback has been called.
final
- onUserLocationUpdated → OnUserLocationUpdated?
-
While the
myLocationEnabled
property is set totrue
, this method is called whenever a new location update is received by the map view.final - rotateGesturesEnabled → bool
-
True if the map view should respond to rotate gestures.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollGesturesEnabled → bool
-
True if the map view should respond to scroll gestures.
final
- styleString → String
-
Style URL or Style JSON
Can be a MapboxStyle constant, any Mapbox Style URL,
or a StyleJSON (https://docs.mapbox.com/mapbox-gl-js/style-spec/)
final
- tiltGesturesEnabled → bool
-
True if the map view should respond to tilt gestures.
final
- trackCameraPosition → bool
-
True if you want to be notified of map camera movements by the MapboxMapController. Default is false.
final
- zoomGesturesEnabled → bool
-
True if the map view should respond to zoom gestures.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited