google_maps_navigation library
Classes
- CameraChangedEvent
- Represents camera changed events in a Google Maps view.
- CameraPosition
- Represents the camera position in a Google Maps view.
- CameraUpdate
- Defines a camera move, supporting absolute moves as well as moves relative the current position.
- Circle
- Circle that has beed added to map.
- CircleClickedEvent
- Event emitted when a circle is clicked.
- CircleOptions
- Defines CircleOptions for a circle.
- DashPattern
- Class representing a dash used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
- Destinations
- Destinations main type.
- DotPattern
- Class representing a dot used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
- GapPattern
- Class representing a gap used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
- The main map view widget for Google Maps Navigation.
- Google Maps Navigation.
- GoogleMapsNavigator handles general actions of the navigation SDK and allows creating navigation session controller.
- Navigation View Controller class to handle navigation view events.
- GpsAvailabilityUpdatedEvent
- 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
- Text labels for Marker info window.
- Lane
- Single lane on the road at the end of a route step.
- LaneDirection
- One of the possible directions from a lane at the end of a route step, and whether it is on the recommended route.
- LatLng
- LatLng coordinate object.
- LatLngBounds
- LatLngBounds bounds object.
- MapClickEvent
- Represents the click position in a Google Maps view.
- MapLongClickEvent
- Represents the long click position in a Google Maps view.
- MapOptions
- Encapsulates the initial configuration required to initialize the google map view.
- Marker
- Marker that has beed added to the map.
- MarkerAnchor
- Specifies the anchor to be at a particular point in the marker image.
- MarkerDragEvent
- Marker drag event sent from platform side.
- MarkerEvent
- Marker event sent from platform side.
- MarkerOptions
- Defines MarkerOptions for a marker.
- MyLocationButtonClickedEvent
- My location button clicked event.
- MyLocationClickedEvent
- 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
- On arrival event message
- PatternItem
- Item used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
- Polygon
- Polygon that has beed added to map.
- PolygonClickedEvent
- Event emitted when a polygon is clicked.
- PolygonOptions
- Defines PolygonOptions for a polygon.
- Polyline
- Polyline that has beed added to map.
- PolylineClickedEvent
- Event emitted when a polyline is clicked.
- PolylineOptions
- Defines PolylineOptions for a polyline.
- RemainingTimeOrDistanceChangedEvent
- Remaining time or distance change event message.
- RoadSnappedLocationUpdatedEvent
- RoadSnappedLocationUpdated event message.
- RoadSnappedRawLocationUpdatedEvent
- RoadSnappedRawLocationUpdated event message (Android only).
- RouteSegment
- Navigation route segment
- RouteSegmentTrafficData
- Route segment traffic data.
- RouteSegmentTrafficDataRoadStretchRenderingData
- Route segment traffic data road strech rendering data type.
- RouteTokenOptions
- Provides options for routing using a route token in the Google Maps Navigation SDK.
- RoutingOptions
- Routing options.
- SimulationOptions
- Navigation simulation options.
- SpeedingUpdatedEvent
- SpeedingUpdated event message.
- StepInfo
- Information about a single step along a navigation route.
- StyleSpan
- Style and length of a stroke on polyline.
- StyleSpanStrokeStyle
- Style for stroke of a polyline.
Enums
- CameraEventType
- Represents the event type for CameraChangedEvent.
- CameraPerspective
- Parameter given to parameter given to the GoogleNavigationViewController.followMyLocation to specify the orientation of the camera.
- CameraUpdateType
- Internal camera update type.
- DrivingSide
- Whether this step is on a drive-on-right or drive-on-left route.
- LaneShape
- A set of values that specify the shape of the road path continuing from the Lane.
- Maneuver
- A set of values that specify the navigation action to take.
- MapType
- Map type.
- MarkerDragEventType
- Marker drag event types
- MarkerEventType
- 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
- Pattern used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
- RouteSegmentTrafficDataRoadStretchRenderingDataStyle
- Route segment traffic data road strech rendering style.
- RouteSegmentTrafficDataStatus
- Traffic data statuses
- SessionInitializationError
- Possible errors that GoogleMapsNavigator.initializeNavigationSession can throw.
- SpeedAlertSeverity
- Type for speed alert severity.
- StrokeJointType
- Joint types for Polyline and outline of Polygon.
Functions
-
clearRegisteredImages(
) → Future< Image Registryvoid> - Remove all registered bitmaps from image registry.
-
getRegisteredImages(
) → Future< Image RegistryList< ImageDescriptor> > - Get all registered bitmaps from image registry.
-
registerBitmapImage(
{required ByteData bitmap, double imagePixelRatio = 1.0, double? width, double? height}) → Future< Image RegistryImageDescriptor> -
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. SetimagePixelRatio
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, setimagePixelRatio
to 2. Optionally specify wanted logical pixel size withwidth
orheight
. If onlywidth
orheight
is specified the other dimension is scaled according to the aspect ratio of the bitmap. -
unregisterImage(
ImageDescriptor imageDescriptor) → Future< Image Registryvoid> - 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.
- Called when the GoogleNavigationViewController.isNavigationUIEnabled status changes.
- 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
- 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
- GoogleNavigationViewController.setMapStyle failed to set the map style.
- MarkerNotFoundException
- GoogleNavigationViewController.updateMarkers or GoogleNavigationViewController.removeMarkers failed to find the marker given to the method.
- MaxZoomRangeException
- GoogleNavigationViewController.setMaxZoomPreference failed to set zoom level.
- MinZoomRangeException
- GoogleNavigationViewController.setMinZoomPreference failed to set zoom level.
- PolygonNotFoundException
- GoogleNavigationViewController.updatePolygons or GoogleNavigationViewController.removePolygons failed to find the polygon given to the method.
- PolylineNotFoundException
- GoogleNavigationViewController.updatePolylines or GoogleNavigationViewController.removePolylines failed to find the polyline given to the method.
- ResetTermsAndConditionsException
- 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
- Exception thrown by GoogleMapsNavigator.initializeNavigationSession.
- SessionNotInitializedException
- GoogleMapsNavigator navigation method call has failed, because the navigation session hasn't yet been successfully initialized.