MapManager class
The MapManager gives the ability to control and to interact with the map
the instance of this manager can only be accessible when the map is ready by the onMapReady event
Example:
@override
Widget build(BuildContext context) {
return MaterialApp(
scaffoldMessengerKey: scaffoldKey,
home: Scaffold(
appBar: AppBar(
title: const Text("Wemap Sample"),
),
body: WemapMap(
options: MapOptions(
mapID: 12345,
token: "",
environment: Environment.PROD),
onMapReady: (
MapData mapData,
MapManager mapManager) {
// what ever to do with MapManager manager and data, the map is ready
},
),
),
);
}
Constructors
- MapManager(MethodChannel _channel)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
activateLevel(
Level level) → Future< void> - switch the focus to the specified level
-
addItinerary(
Coordinate origin, Coordinate destination, {bool avoidElevators = false, bool avoidEscalators = false, bool avoidStairs = false}) → Future< void> - add itinerary from an origin coordinate to a specified destination
-
addItineraryFromMapCenter(
Coordinate coordinate, {bool avoidElevators = false, bool avoidEscalators = false, bool avoidStairs = false}) → Future< void> - add itinerary from map center to the specified destination
-
addItineraryFromUserLocation(
Coordinate coordinate, {bool avoidElevators = false, bool avoidEscalators = false, bool avoidStairs = false}) → Future< void> - add itinerary from user location to the specified destination
-
disablePOISelection(
) → Future< void> - disable POIs selection
-
enablePOISelection(
) → Future< void> - enable POIs selection
-
enableTrackingMode(
) → Future< void> - enable user tracking mode
-
filterByTag(
String tag) → Future< void> - filter a Point Of Interest by its tag
-
getPOIs(
) → Future< List< PointOfInterest> > - retrieve available Points Of Interest
-
getUserLocation(
) → Future< Coordinate?> - get user location coordinates
-
getZoom(
) → Future< double> - retrieve the current map's zoom
-
hideAllPOIs(
) → Future< void> - hide all Points Of Interest
-
hidePOIById(
int id) → Future< void> - hide a Point Of Interest by its id
-
locateMe(
) → Future< void> - locate the user and add annotation
-
moveCamera(
{required double latitude, required double longitude, double zoom = 18.0, double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) → Future< void> - move the camera with the given options
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeFilters(
) → Future< void> - remove all filters
-
removeItinerary(
) → Future< void> - remove the current itinerary
-
restoreCamera(
) → Future< void> - restore the camera position to the previous state
-
selectPOIById(
int id) → Future< void> - select a Point Of Interest by its id
-
showPOIById(
int id) → Future< void> - show a Point Of Interest by its id
- start the navigation from user location to the given coordinates
-
startVPS(
) → Future< void> - start the VPS scanning to retrieve user position
- stop the current navigation
-
stopVPS(
) → Future< void> - stop the VPS scanning
-
storeCamera(
) → Future< void> - store the camera position and state
-
toString(
) → String -
A string representation of this object.
inherited
-
unselectPOIById(
int id) → Future< void> - unselect a Point Of Interest by its id
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited