GoogleMapController class
Encapsulates a gmaps.GMap
, its events, and where in the DOM it's rendered.
Constructors
-
GoogleMapController({required int mapId, required StreamController<
MapEvent< streamController, required MapWidgetConfiguration widgetConfiguration, MapObjects mapObjects = const MapObjects(), MapConfiguration mapConfiguration = const MapConfiguration()})Object?> > - Initializes the GMap, and the sub-controllers related to it. Wires events.
Properties
- clusterManagersController → ClusterManagersController?
-
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
- 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? markers, CirclesController? circles, PolygonsController? polygons, PolylinesController? polylines, ClusterManagersController? clusterManagers, TileOverlaysController? tileOverlays}) → 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 ascreenCoordinate
(in pixels) of the viewport. -
getScreenCoordinate(
LatLng latLng) → Future< ScreenCoordinate> -
Returns the
ScreenCoordinate
for a given viewportLatLng
. -
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 itsMarkerId
. -
init(
) → void -
Starts the JS Maps SDK into the target
_div
withrawOptions
. -
isInfoWindowShown(
MarkerId markerId) → bool -
Returns true if the
InfoWindow
of the marker identified byMarkerId
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 itsMarkerId
. -
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. -
updateMapConfiguration(
MapConfiguration update) → void -
Updates the map options from a
MapConfiguration
. -
updateMarkers(
MarkerUpdates updates) → 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
TileOverlay
s.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited