google_maps_navigation library

Classes

CameraChangedEvent Navigation View
Represents camera changed events in a Google Maps view.
CameraPosition Navigation View
Represents the camera position in a Google Maps view.
CameraUpdate Navigation View
Defines a camera move, supporting absolute moves as well as moves relative the current position.
Circle Navigation View
Circle that has beed added to map.
CircleClickedEvent Navigation View
Event emitted when a circle is clicked.
CircleOptions Navigation View
Defines CircleOptions for a circle.
DashPattern Navigation View
Class representing a dash used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
Destinations Navigation
Destinations main type.
DotPattern Navigation View
Class representing a dot used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
GapPattern Navigation View
Class representing a gap used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
GoogleMapsNavigationView Navigation View
The main map view widget for Google Maps Navigation.
GoogleMapsNavigationViewState Navigation View
Google Maps Navigation.
GoogleMapsNavigator Navigation
GoogleMapsNavigator handles general actions of the navigation SDK and allows creating navigation session controller.
GoogleNavigationViewController Navigation View
Navigation View Controller class to handle navigation view events.
GpsAvailabilityUpdatedEvent Navigation
GpsAvailabilityUpdated event message (Android only).
ImageDescriptor Image Registry
Defines an image. For marker this class can be used to set the image of the marker icon.
InfoWindow Navigation View
Text labels for Marker info window.
Lane Navigation
Single lane on the road at the end of a route step.
LaneDirection Navigation
One of the possible directions from a lane at the end of a route step, and whether it is on the recommended route.
LatLng Navigation Navigation View
LatLng coordinate object.
LatLngBounds Navigation View
LatLngBounds bounds object.
MapClickEvent Navigation View
Represents the click position in a Google Maps view.
MapLongClickEvent Navigation View
Represents the long click position in a Google Maps view.
MapOptions Navigation View
Encapsulates the initial configuration required to initialize the google map view.
Marker Navigation View
Marker that has beed added to the map.
MarkerAnchor Navigation View
Specifies the anchor to be at a particular point in the marker image.
MarkerDragEvent Navigation View
Marker drag event sent from platform side.
MarkerEvent Navigation View
Marker event sent from platform side.
MarkerOptions Navigation View
Defines MarkerOptions for a marker.
MyLocationButtonClickedEvent Navigation View
My location button clicked event.
MyLocationClickedEvent Navigation View
My location clicked event.
Navigation audio guidance settings.
Display options.
Time and distance to next waypoint.
Represents navigation UI changed event in a view.
Encapsulates the initial configuration required to initialize the navigation map view.
Encapsulates the initial configuration required to initialize the navigation view.
Navigation view recenter clicked event.
Settings for the user interface of the map.
Navigation waypoint with different constructors based in on type of initialization.
Contains information about the state of navigation, the current nav step if available, and remaining steps if available.
NavInfo event message
OnArrivalEvent Navigation
On arrival event message
PatternItem Navigation View
Item used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
Polygon Navigation View
Polygon that has beed added to map.
PolygonClickedEvent Navigation View
Event emitted when a polygon is clicked.
PolygonOptions Navigation View
Defines PolygonOptions for a polygon.
Polyline Navigation View
Polyline that has beed added to map.
PolylineClickedEvent Navigation View
Event emitted when a polyline is clicked.
PolylineOptions Navigation View
Defines PolylineOptions for a polyline.
RemainingTimeOrDistanceChangedEvent Navigation
Remaining time or distance change event message.
RoadSnappedLocationUpdatedEvent Navigation
RoadSnappedLocationUpdated event message.
RoadSnappedRawLocationUpdatedEvent Navigation
RoadSnappedRawLocationUpdated event message (Android only).
RouteSegment Navigation View
Navigation route segment
RouteSegmentTrafficData Navigation View
Route segment traffic data.
RouteSegmentTrafficDataRoadStretchRenderingData Navigation View
Route segment traffic data road strech rendering data type.
RouteTokenOptions Navigation
Provides options for routing using a route token in the Google Maps Navigation SDK.
RoutingOptions Navigation
Routing options.
SimulationOptions Navigation
Navigation simulation options.
SpeedingUpdatedEvent Navigation
SpeedingUpdated event message.
StepInfo Navigation
Information about a single step along a navigation route.
StyleSpan Navigation View
Style and length of a stroke on polyline.
StyleSpanStrokeStyle Navigation View
Style for stroke of a polyline.

Enums

CameraEventType Navigation View
Represents the event type for CameraChangedEvent.
CameraPerspective Navigation View
Parameter given to parameter given to the GoogleNavigationViewController.followMyLocation to specify the orientation of the camera.
CameraUpdateType Navigation View
Internal camera update type.
DrivingSide Navigation
Whether this step is on a drive-on-right or drive-on-left route.
LaneShape Navigation
A set of values that specify the shape of the road path continuing from the Lane.
Maneuver Navigation
A set of values that specify the navigation action to take.
MapType Navigation View
Map type.
MarkerDragEventType Navigation View
Marker drag event types
MarkerEventType Navigation View
Marker event types
Alternative routes strategy.
Navigation audio guidance type.
Status of the navigation routing.
Routing strategy.
Travel model for routing options.
Determines the initial visibility of the navigation UI on map initialization.
The state of navigation.
PatternType Navigation View
Pattern used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
RouteSegmentTrafficDataRoadStretchRenderingDataStyle Navigation View
Route segment traffic data road strech rendering style.
RouteSegmentTrafficDataStatus Navigation View
Traffic data statuses
SessionInitializationError Navigation
Possible errors that GoogleMapsNavigator.initializeNavigationSession can throw.
SpeedAlertSeverity Navigation
Type for speed alert severity.
StrokeJointType Navigation View
Joint types for Polyline and outline of Polygon.

Functions

clearRegisteredImages() Future<void> Image Registry
Remove all registered bitmaps from image registry.
getRegisteredImages() Future<List<ImageDescriptor>> Image Registry
Get all registered bitmaps from image registry.
registerBitmapImage({required ByteData bitmap, double imagePixelRatio = 1.0, double? width, double? height}) Future<ImageDescriptor> Image Registry
Register bitmap image to image registry. Returns ImageDescriptor that can be used to reference the bitmap when creating MarkerOptions. bitmap is the bytes of bitmap to be registered, in PNG format. Set imagePixelRatio if bitmap is larger tha it's intended display size. For example, if image width is 64 pixels and it need's to be displayed in 32 logical pixel size, set imagePixelRatio to 2. Optionally specify wanted logical pixel size with width or height. If only width or height is specified the other dimension is scaled according to the aspect ratio of the bitmap.
unregisterImage(ImageDescriptor imageDescriptor) Future<void> Image Registry
Delete previously registered bitmap from image registry.

Typedefs

AnimationFinishedCallback = void Function(bool success)
Called when the camera animation finishes.
OnArrivalEventCallback = void Function(OnArrivalEvent onArrivalEvent)
Called during arriving to destination event.
OnCameraIdle = void Function(CameraPosition position)
Called when the camera movement has ended, there are no pending animations and the user has stopped interacting with the map.
OnCameraMove = void Function(CameraPosition position)
Called repeatedly as the camera continues to move after the OnCameraMoveStarted call. The method may be called as often as once every frame.
OnCameraMoveStarted = void Function(CameraPosition position, bool gesture)
Called when the camera starts moving after it has been idle or when the reason for the camera motion has changed.
OnCameraStartedFollowingLocation = void Function(CameraPosition position)
Called when the camera starts following current location, typically will get called in response to GoogleNavigationViewController.followMyLocation. Only applicable on Android.
OnCameraStoppedFollowingLocation = void Function(CameraPosition position)
Called when the camera stops following current location. A camera already following location will exit the follow mode if the camera is moved via user gesture or an API call, e.g. GoogleNavigationViewController.moveCamera or GoogleNavigationViewController.animateCamera. Only applicable on Android.
OnCircleClicked = void Function(String circleId)
Called during circle clicked event.
OnCreatedCallback = void Function(GoogleNavigationViewController controller)
The view creation callback.
OnGpsAvailabilityEventCallback = void Function(GpsAvailabilityUpdatedEvent gpsAvailabilityUpdatedEvent)
Called during GPS availability event. (Android only).
OnMapClicked = void Function(LatLng position)
Called during map clicked event.
OnMapLongClicked = void Function(LatLng position)
Called during map long clicked event.
OnMarkerClicked = void Function(String markerId)
Called during marker click event.
OnMarkerDrag = void Function(String markerId, LatLng newPosition)
Called during marker drag event.
OnMarkerDragEnd = void Function(String markerId, LatLng newPosition)
Called during marker drag end event.
OnMarkerDragStart = void Function(String markerId, LatLng newPosition)
Called during marker drag start event.
OnMarkerInfoWindowClicked = void Function(String markerId)
Called during marker info window clicked event.
OnMarkerInfoWindowClosed = void Function(String markerId)
Called during marker info window closed event.
OnMarkerInfoWindowLongClicked = void Function(String markerId)
Called during marker info window long clicked event.
OnMyLocationButtonClicked = void Function(MyLocationButtonClickedEvent)
Called during my location button clicked event.
OnMyLocationClicked = void Function(MyLocationClickedEvent)
Called during my location clicked event.
OnNavigationUIEnabledChanged = void Function(bool navigationUIEnabled)
Called when the GoogleNavigationViewController.isNavigationUIEnabled status changes.
OnNavInfoEventCallback = void Function(NavInfoEvent onNavInfo)
Called on navigation info event.
OnPolygonClicked = void Function(String polygonId)
Called during polygon clicked event.
OnPolylineClicked = void Function(String polylineId)
Called during polyline clicked event.
OnRecenterButtonClicked = void Function(NavigationViewRecenterButtonClickedEvent)
Called during recenter button click event.
OnRemainingTimeOrDistanceChangedEventCallback = void Function(RemainingTimeOrDistanceChangedEvent onRemainingTimeOrDistanceChangedEvent)
Called during remaining time or distance changed event.
OnReroutingEventCallback = void Function()
Called during rerouting event. (Android only)
OnRoadSnappedLocationUpdatedEventCallback = void Function(RoadSnappedLocationUpdatedEvent onRoadSnappedLocationUpdatedEvent)
Called during road snapped location event.
OnRoadSnappedRawLocationUpdatedEventCallback = void Function(RoadSnappedRawLocationUpdatedEvent onRoadSnappedRawLocationUpdatedEvent)
Called during road snapped raw location event (Android only).
OnRouteChangedEventCallback = void Function()
Called during route changed event.
OnSpeedingUpdatedEventCallback = void Function(SpeedingUpdatedEvent onSpeedingUpdatedEvent)
Called during speeding event.
OnTrafficUpdatedEventCallback = void Function()
Called during traffic updated event. (Android only)

Exceptions / Errors

CircleNotFoundException Navigation View
GoogleNavigationViewController.updateCircles or GoogleNavigationViewController.removeCircles failed to find the circle given to the method.
ImageDecodingFailedException Image Registry
registerBitmapImage failed to decode bitmap from byte array.
MapStyleException Navigation View
GoogleNavigationViewController.setMapStyle failed to set the map style.
MarkerNotFoundException Navigation View
GoogleNavigationViewController.updateMarkers or GoogleNavigationViewController.removeMarkers failed to find the marker given to the method.
MaxZoomRangeException Navigation View
GoogleNavigationViewController.setMaxZoomPreference failed to set zoom level.
MinZoomRangeException Navigation View
GoogleNavigationViewController.setMinZoomPreference failed to set zoom level.
PolygonNotFoundException Navigation View
GoogleNavigationViewController.updatePolygons or GoogleNavigationViewController.removePolygons failed to find the polygon given to the method.
PolylineNotFoundException Navigation View
GoogleNavigationViewController.updatePolylines or GoogleNavigationViewController.removePolylines failed to find the polyline given to the method.
ResetTermsAndConditionsException Navigation
Exception thrown by GoogleMapsNavigator.resetTermsAccepted, when attempting to reset the terms and conditions after the session has already been initialized.
RouteTokenMalformedException
GoogleMapsNavigator.setDestinations method call has failed, because the RouteTokenOptions.routeToken is malformed. (Android only)
SessionInitializationException Navigation
Exception thrown by GoogleMapsNavigator.initializeNavigationSession.
SessionNotInitializedException Navigation
GoogleMapsNavigator navigation method call has failed, because the navigation session hasn't yet been successfully initialized.