google_navigation_flutter library
Classes
- AutoMapOptions
- Configuration options for Android Auto and CarPlay map views.
- AutoScreenAvailabilityChangedEvent Android Auto Carplay
- CameraChangedEvent Map View
- Represents camera changed events in a Google Maps view.
- CameraPosition Map View Android Auto Carplay
- Represents the camera position in a Google Maps view.
- CameraUpdate Map View Android Auto Carplay
- Defines a camera move, supporting absolute moves as well as moves relative the current position.
- Circle Map View Android Auto Carplay
- Circle that has beed added to map.
- CircleClickedEvent Map View
- Event emitted when a circle is clicked.
- CircleOptions Map View
- Defines CircleOptions for a circle.
- ContinueToNextDestinationResponse
- Response returned by GoogleMapsNavigator.continueToNextDestination.
- DashPattern Map View
- 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 Map View
- Class representing a dot used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
- GapPattern Map View
- Class representing a gap used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
- GoogleMapsAutoViewController Android Auto Carplay
- GoogleMapsBaseMapView Map View
- The base view for map view and navigation view. Not to be used by itself.
- GoogleMapsMapView Map View
- The main map view widget for Google Maps Map View.
- GoogleMapsMapViewState Map View
- Google Maps Map View.
- 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.
- GoogleMapViewController Map View
- Map View Controller class to handle map view events.
- Navigation View Controller class to handle navigation view events.
- GpsAvailabilityChangeEvent
- GpsAvailabilityChange event message (Android only).
- 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.
- IndoorActiveLevelChangedEvent Map View
- Event emitted when active indoor level changes.
- IndoorBuilding Map View
- Represents focused indoor building metadata.
- IndoorFocusedBuildingChangedEvent Map View
- Event emitted when focused indoor building changes.
- IndoorLevel Map View
- Represents one indoor level in a focused indoor building.
- InfoWindow Map View
- 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 Map View Android Auto Carplay
- LatLng coordinate object.
- LatLngBounds Map View Android Auto Carplay
- LatLngBounds bounds object.
- MapClickEvent Map View
- Represents the click position in a Google Maps view.
- MapLongClickEvent Map View
- Represents the long click position in a Google Maps view.
- MapOptions Map View
- Encapsulates the initial configuration required to initialize the google map view.
- MapViewInitializationOptions Map View
- Encapsulates the initial configuration required to initialize the navigation map view.
-
MapViewState<
T extends GoogleMapsBaseMapView> - Marker Map View Android Auto Carplay
- Marker that has beed added to the map.
- MarkerAnchor Map View
- Specifies the anchor to be at a particular point in the marker image.
- MarkerDragEvent Map View
- Marker drag event sent from platform side.
- MarkerEvent Map View
- Marker event sent from platform side.
- MarkerOptions Map View
- Defines MarkerOptions for a marker.
- MyLocationButtonClickedEvent Map View
- My location button clicked event.
- MyLocationClickedEvent Map View
- My location clicked event.
- Navigation audio guidance settings.
- Display options.
- Styling options for the native navigation header.
- Time and distance to next waypoint.
- Represents navigation UI changed event in a 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 Map View
- Item used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
- PoiClickedEvent Map View
- Represents a POI click event in a Google Maps view.
- PointOfInterest Map View
- Represents a point of interest (POI) on the map. POIs include parks, schools, government buildings, and businesses.
- Polygon Map View Android Auto Carplay
- Polygon that has beed added to map.
- PolygonClickedEvent Map View
- Event emitted when a polygon is clicked.
- PolygonOptions Map View
- Defines PolygonOptions for a polygon.
- Polyline Map View Android Auto Carplay
- Polyline that has beed added to map.
- PolylineClickedEvent Map View
- Event emitted when a polyline is clicked.
- PolylineOptions Map View
- Defines PolylineOptions for a polyline.
- PromptVisibilityChangedEvent Android Auto Carplay
- Represents prompt visibility changed event in a view.
- 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.
- SpeedAlertOptions
- Speed alert options.
- SpeedingUpdatedEvent
- SpeedingUpdated event message.
- StepImageGenerationOptions
- Options for step image generation in turn-by-turn navigation events.
- StepInfo
- Information about a single step along a navigation route.
- StyleSpan Map View
- Style and length of a stroke on polyline.
- StyleSpanStrokeStyle Map View
- Style for stroke of a polyline.
- TermsAndConditionsUIParams
- UI customization parameters for the Terms and Conditions dialog.
Enums
- CameraEventType Map View
- Represents the event type for CameraChangedEvent.
- CameraPerspective Map View Android Auto Carplay
- Parameter given to parameter given to the GoogleNavigationViewController.followMyLocation to specify the orientation of the camera.
- CameraUpdateType Map View
- 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.
- MapColorScheme Map View
- Map color scheme mode.
- MapType Map View Android Auto Carplay
- Map type.
- MarkerDragEventType Map View
- Marker drag event types
- MarkerEventType Map View
- Marker event types
- Alternative routes strategy.
- Navigation audio guidance type.
- Navigation night mode.
- 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 Map View
- Pattern used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
- RegisteredImageType Image Registry
- Registered image type filter for clearing registered images.
- 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 Map View
- Joint types for Polyline and outline of Polygon.
- TaskRemovedBehavior
- Determines how application should behave when a application task is removed.
- TrafficDelaySeverity
- Traffic delay severity.
Constants
- unsupportedPlatformCode → const String
- Platform code for unsupported features.
Functions
-
clearRegisteredImages(
{RegisteredImageType? filter}) → Future< Image Registryvoid> - Remove all registered bitmaps from image registry.
-
convertPlatformException(
Object exception, StackTrace stacktrace) → Object -
Converts
exceptionto GoogleMapsNavigationPlatformException ifexceptionis a PlatformException. -
getRegisteredImage(
ImageDescriptor imageDescriptor) → Future< Image RegistryImage?> - Get registered PNG image data from image registry anc convert it to Image.
-
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.
bitmapis the bytes of bitmap to be registered, in PNG format. SetimagePixelRatioif 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, setimagePixelRatioto 2. Optionally specify wanted logical pixel size withwidthorheight. If onlywidthorheightis 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.
- OnGpsAvailabilityChangeEventCallback = void Function(GpsAvailabilityChangeEvent gpsAvailabilityChangeEvent)
- Called during GPS availability change event. (Android only).
- OnGpsAvailabilityEventCallback = void Function(GpsAvailabilityUpdatedEvent gpsAvailabilityUpdatedEvent)
- Called during GPS availability event. (Android only).
- OnIndoorActiveLevelChanged = void Function(IndoorBuilding? building)
- Called when the active indoor level changes.
- OnIndoorFocusedBuildingChanged = void Function(IndoorBuilding? building)
- Called when the focused indoor building changes.
- OnMapClicked = void Function(LatLng position)
- Called during map clicked event.
- OnMapLongClicked = void Function(LatLng position)
- Called during map long clicked event.
- OnMapViewCreatedCallback = void Function(GoogleMapViewController controller)
- On Google Map view created callback.
- OnMarkerClicked = void Function(String circleId)
- 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 circleId)
- Called during marker info window clicked event.
- OnMarkerInfoWindowClosed = void Function(String circleId)
- Called during marker info window closed event.
- OnMarkerInfoWindowLongClicked = void Function(String circleId)
- 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.
- On Google Navigation view created callback.
- Called on navigation info event.
- Called on new navigation session event.
- OnPoiClicked = void Function(PointOfInterest pointOfInterest)
- Called when a user taps on a point of interest (POI) on the map. POIs include parks, schools, government buildings, and businesses.
- OnPolygonClicked = void Function(String circleId)
- Called during polygon clicked event.
- OnPolylineClicked = void Function(String circleId)
- Called during polyline clicked event.
- OnPromptVisibilityChanged = void Function(bool success)
- Called when the visibility of navigation prompts changes.
- 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 Map View
- GoogleNavigationViewController.updateCircles or GoogleNavigationViewController.removeCircles failed to find the circle given to the method.
- Abstract base class for specific platform exceptions derived from this plugin.
- ImageDecodingFailedException Image Registry
- registerBitmapImage failed to decode bitmap from byte array.
- IndoorLevelActivationException Map View
- GoogleNavigationViewController.activateIndoorLevel failed.
- MapStyleException Map View
- GoogleNavigationViewController.setMapStyle failed to set the map style.
- MarkerNotFoundException Map View
- GoogleNavigationViewController.updateMarkers or GoogleNavigationViewController.removeMarkers failed to find the marker given to the method.
- MaxZoomRangeException Map View
- GoogleNavigationViewController.setMaxZoomPreference failed to set zoom level.
- MinZoomRangeException Map View
- GoogleNavigationViewController.setMinZoomPreference failed to set zoom level.
- PolygonNotFoundException Map View
- GoogleNavigationViewController.updatePolygons or GoogleNavigationViewController.removePolygons failed to find the polygon given to the method.
- PolylineNotFoundException Map View
- 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.
- ViewNotFoundException Map View
- Exception thrown when a platform view is not found.