GoogleMapsPlugin class

The web implementation of GoogleMapsFlutterPlatform.

This class implements the package:google_maps_flutter functionality for the web.

Inheritance
  • Object
  • PlatformInterface
  • GoogleMapsPlugin

Constructors

GoogleMapsPlugin()

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

animateCamera(CameraUpdate cameraUpdate, {required int mapId}) Future<void>
Applies the given cameraUpdate to the current viewport (with animation).
buildView(int creationId, PlatformViewCreatedCallback onPlatformViewCreated, {required CameraPosition initialCameraPosition, Set<Marker> markers = const <Marker>{}, Set<Polygon> polygons = const <Polygon>{}, Set<Polyline> polylines = const <Polyline>{}, Set<Circle> circles = const <Circle>{}, Set<TileOverlay> tileOverlays = const <TileOverlay>{}, Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{}, Map<String, dynamic> mapOptions = const <String, dynamic>{}}) Widget
Returns a widget displaying the map view - deprecated, use buildViewWithConfiguration instead.
inherited
buildViewWithConfiguration(int creationId, PlatformViewCreatedCallback onPlatformViewCreated, {required MapWidgetConfiguration widgetConfiguration, MapObjects mapObjects = const MapObjects(), MapConfiguration mapConfiguration = const MapConfiguration()}) Widget
Returns a widget displaying the map view.
buildViewWithTextDirection(int creationId, PlatformViewCreatedCallback onPlatformViewCreated, {required CameraPosition initialCameraPosition, required TextDirection textDirection, Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers, Set<Marker> markers = const <Marker>{}, Set<Polygon> polygons = const <Polygon>{}, Set<Polyline> polylines = const <Polyline>{}, Set<Circle> circles = const <Circle>{}, Set<TileOverlay> tileOverlays = const <TileOverlay>{}, Map<String, dynamic> mapOptions = const <String, dynamic>{}}) Widget
Returns a widget displaying the map view - deprecated, use buildViewWithConfiguration instead.
inherited
clearTileCache(TileOverlayId tileOverlayId, {required int mapId}) Future<void>
Clears the tile cache so that all tiles will be requested again from the TileProvider.
debugSetMapById(Map<int, GoogleMapController> mapById) → void
Allows tests to inject controllers without going through the buildView flow.
dispose({required int mapId}) → void
Disposes of the current map. It can't be used afterwards!
enableDebugInspection() → void
Populates GoogleMapsFlutterInspectorPlatform.instance to allow inspecting the platform map state.
getLatLng(ScreenCoordinate screenCoordinate, {required int mapId}) Future<LatLng>
Returns the LatLng of a ScreenCoordinate of the viewport.
getScreenCoordinate(LatLng latLng, {required int mapId}) Future<ScreenCoordinate>
Returns the screen coordinate (in pixels) of a given latLng.
getVisibleRegion({required int mapId}) Future<LatLngBounds>
Returns the bounds of the current viewport.
getZoomLevel({required int mapId}) Future<double>
Returns the zoom level of the mapId.
hideMarkerInfoWindow(MarkerId markerId, {required int mapId}) Future<void>
Hides the InfoWindow (if any) of the Marker identified by markerId.
init(int mapId) Future<void>
/// Initializes the platform interface with id.
isMarkerInfoWindowShown(MarkerId markerId, {required int mapId}) Future<bool>
Returns true if the InfoWindow of the Marker identified by markerId is shown.
moveCamera(CameraUpdate cameraUpdate, {required int mapId}) Future<void>
Applies the given cameraUpdate to the current viewport.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCameraIdle({required int mapId}) Stream<CameraIdleEvent>
The Camera is now idle.
onCameraMove({required int mapId}) Stream<CameraMoveEvent>
The Camera finished moving to a new CameraPosition.
onCameraMoveStarted({required int mapId}) Stream<CameraMoveStartedEvent>
The Camera started moving.
onCircleCenterChanged({required int mapId}) Stream<CircleCenterChangedEvent>
onCircleRadiusChanged({required int mapId}) Stream<CircleRadiusChangedEvent>
onCircleTap({required int mapId}) Stream<CircleTapEvent>
实现接口 实现方法
onDrawmanagerChanged({required int mapId}) Stream<MapDrawmanagerListEvent>
onInfoWindowTap({required int mapId}) Stream<InfoWindowTapEvent>
An InfoWindow has been tapped.
onLongPress({required int mapId}) Stream<MapLongPressEvent>
A Map has been long-pressed at a certain LatLng.
onMarkerDrag({required int mapId}) Stream<MarkerDragEvent>
A Marker has been dragged to a different LatLng position.
onMarkerDragEnd({required int mapId}) Stream<MarkerDragEndEvent>
A Marker has been dragged to a different LatLng position.
onMarkerDragStart({required int mapId}) Stream<MarkerDragStartEvent>
A Marker has been dragged to a different LatLng position.
onMarkerTap({required int mapId}) Stream<MarkerTapEvent>
A Marker has been tapped.
onPolygonDragend({required int mapId}) Stream<PolygonDragendEvent>
接口实现 实现方法
onPolygonInsertAt({required int mapId}) Stream<PolygonInsertAtEvent>
onPolygonRemoveAt({required int mapId}) Stream<PolygonRemoveAtEvent>
onPolygonSetAt({required int mapId}) Stream<PolygonSetAtEvent>
onPolygonTap({required int mapId}) Stream<PolygonTapEvent>
A Polygon has been tapped.
onPolylineTap({required int mapId}) Stream<PolylineTapEvent>
A Polyline has been tapped.
onTap({required int mapId}) Stream<MapTapEvent>
A Map has been tapped at a certain LatLng.
setMapStyle(String? mapStyle, {required int mapId}) Future<void>
Sets the passed-in mapStyle to the map.
showMarkerInfoWindow(MarkerId markerId, {required int mapId}) Future<void>
Shows the InfoWindow (if any) of the Marker identified by markerId.
takeSnapshot({required int mapId}) Future<Uint8List?>
Returns the image bytes of the map.
inherited
toString() String
A string representation of this object.
inherited
updateCircles(CircleUpdates circleUpdates, {required int mapId}) Future<void>
Applies the passed in circleUpdates to the mapId.
updateMapConfiguration(MapConfiguration update, {required int mapId}) Future<void>
Updates the options of a given mapId.
updateMapOptions(Map<String, dynamic> optionsUpdate, {required int mapId}) Future<void>
Updates configuration options of the map user interface - deprecated, use updateMapConfiguration instead.
inherited
updateMarkers(MarkerUpdates markerUpdates, {required int mapId}) Future<void>
Applies the passed in markerUpdates to the mapId.
updatePolygons(PolygonUpdates polygonUpdates, {required int mapId}) Future<void>
Applies the passed in polygonUpdates to the mapId.
updatePolylines(PolylineUpdates polylineUpdates, {required int mapId}) Future<void>
Applies the passed in polylineUpdates to the mapId.
updateTileOverlays({required Set<TileOverlay> newTileOverlays, required int mapId}) Future<void>
Updates tile overlay configuration.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

registerWith(Registrar registrar) → void
Registers this class as the default instance of GoogleMapsFlutterPlatform.