GoogleMapController class

Encapsulates a gmaps.Map, its events, and where in the DOM it's rendered.

Constructors

GoogleMapController({required int mapId, required StreamController<MapEvent<Object?>> streamController, required MapWidgetConfiguration widgetConfiguration, MapObjects mapObjects = const MapObjects(), MapConfiguration mapConfiguration = const MapConfiguration()})
Initializes the GMap, and the sub-controllers related to it. Wires events.

Properties

clusterManagersController → ClusterManagersController<Object?>?
The ClusterManagersController of this Map. Only for integration testing.
no setter
configuration → MapConfiguration
Configuration accessor for the GoogleMapsInspectorWeb.
no setter
events → Stream<MapEvent<Object?>>
The Stream over which this controller broadcasts events.
no setter
groundOverlayController → GroundOverlaysController?
The GroundOverlaysController of this Map. Only for integration testing.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isInitialized → bool
A flag that returns true if the controller has been initialized or not.
no setter
lastStyleError → String?
Returns the last error from setting the map's style, if any.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stream → StreamController<MapEvent<Object?>>
The StreamController for the events of this Map. Only for integration testing.
no setter
styles → List<MapTypeStyle>
A getter for the current styles. Only for tests.
no setter
trafficLayer → TrafficLayer?
A getter for the current traffic layer. Only for tests.
no setter
widget → Widget?
The Flutter widget that will contain the rendered Map. Used for caching.
no setter

Methods

clearTileCache(TileOverlayId id) → void
Clears the tile cache associated with the given TileOverlayId.
debugSetOverrides({DebugCreateMapFunction? createMap, DebugSetOptionsFunction? setOptions, MarkersController<Object?, Object>? markers, CirclesController? circles, HeatmapsController? heatmaps, PolygonsController? polygons, PolylinesController? polylines, ClusterManagersController<Object?>? clusterManagers, TileOverlaysController? tileOverlays, GroundOverlaysController? groundOverlays}) → void
Overrides certain properties to install mocks defined during testing.
dispose() → void
Disposes of this controller and its resources.
getLatLng(ScreenCoordinate screenCoordinate) → Future<LatLng>
Returns the LatLng for a screenCoordinate (in pixels) of the viewport.
getScreenCoordinate(LatLng latLng) → Future<ScreenCoordinate>
Returns the ScreenCoordinate for a given viewport LatLng.
getVisibleRegion() → Future<LatLngBounds>
Returns the LatLngBounds of the current viewport.
getZoomLevel() → Future<double>
Returns the zoom level of the current viewport.
hideInfoWindow(MarkerId markerId) → void
Hides the InfoWindow of the marker identified by its MarkerId.
init() → void
Starts the JS Maps SDK into the target _div with rawOptions.
isAdvancedMarkersAvailable() → bool
Returns true if this map supports AdvancedMarkers.
isInfoWindowShown(MarkerId markerId) → bool
Returns true if the InfoWindow of the marker identified by MarkerId is shown.
moveCamera(CameraUpdate cameraUpdate) → Future<void>
Applies a cameraUpdate to the current viewport.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showInfoWindow(MarkerId markerId) → void
Shows the InfoWindow of the marker identified by its MarkerId.
toString() → String
A string representation of this object.
inherited
updateCircles(CircleUpdates updates) → void
Applies CircleUpdates to the currently managed circles.
updateClusterManagers(ClusterManagerUpdates updates) → void
Applies ClusterManagerUpdates to the currently managed cluster managers.
updateGroundOverlays(GroundOverlayUpdates updates) → void
Updates the set of GroundOverlays.
updateHeatmaps(HeatmapUpdates updates) → void
Applies HeatmapUpdates to the currently managed heatmaps.
updateMapConfiguration(MapConfiguration update) → void
Updates the map options from a MapConfiguration.
updateMarkers(MarkerUpdates updates) → Future<void>
Applies MarkerUpdates to the currently managed markers.
updatePolygons(PolygonUpdates updates) → void
Applies PolygonUpdates to the currently managed polygons.
updatePolylines(PolylineUpdates updates) → void
Applies PolylineUpdates to the currently managed lines.
updateStyles(List<MapTypeStyle> styles) → void
Updates the map options with a new list of styles.
updateTileOverlays(Set<TileOverlay> newOverlays) → void
Updates the set of TileOverlays.

Operators

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