Map class abstract
The object that is used to interact with the map.
- Implemented types
Constructors
- Map()
Properties
- awesomeModelsEnabled ↔ bool
-
Enables rich textured 3d content on basemap.
getter/setter pair
- cameraBounds → CameraBounds
-
no setter
- cameraPosition → CameraPosition
-
Return Current camera position. Target position must be within
latitude [-90, 90] and longitude [-180, 180].
no setter
- fastTapEnabled ↔ bool
-
Removes the 300 ms delay in emitting a tap gesture. However, a
double-tap will emit a tap gesture along with a double-tap.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hdModeEnabled ↔ bool
-
Enables hd mode of displayed content
getter/setter pair
- logo → Logo
-
Yandex logo object.
no setter
- mapObjects → MapObjectCollection
-
Return List of map objects associated with the map. The layerId for
this collection can be retrieved via LayerIds.mapObjectsLayerId
no setter
- mapType ↔ MapType
-
Sets the base map type.
getter/setter pair
- mode ↔ MapMode
-
Selects one of predefined map style modes optimized for particular
use case(transit, driving, etc). Resets json styles set with
setMapStyle. MapMode.Map by deafult.
getter/setter pair
- nightModeEnabled ↔ bool
-
If enabled, night mode will reduce map brightness and improve
contrast.
getter/setter pair
- poiLimit ↔ int?
-
Limits the number of visible basemap POIs.
getter/setter pair
- rotateGesturesEnabled ↔ bool
-
Enable/disable rotation gestures, such as rotation with two fingers.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollGesturesEnabled ↔ bool
-
Enable/disable scroll gestures, such as the pan gesture.
getter/setter pair
- tiltGesturesEnabled ↔ bool
-
Enable/disable tilt gestures, such as parallel pan with two fingers.
getter/setter pair
- visibleRegion → VisibleRegion
-
Return The map region that is currently visible. Region IS bounded by
latitude limits [-90, 90] and IS NOT bounded by longitude limits
[-180, 180]. If the longitude exceeds its limits, we see the
world's edge and another instance of the world beyond this edge.
no setter
- zoomGesturesEnabled ↔ bool
-
Enable/disable zoom gestures, for example: - pinch - double tap (zoom
in) - tap with two fingers (zoom out)
getter/setter pair
Methods
-
addCameraListener(
MapCameraListener cameraListener) → void - Adds camera listeners.
-
addInputListener(
MapInputListener inputListener) → void - Adds input listeners.
-
addTapListener(
LayersGeoObjectTapListener tapListener) → void - Adds a tap listener that is used to obtain brief geo object info.
-
addTileLayer(
LayerOptions layerOptions, CreateTileDataSource createDataSource, {required String layerId}) → Layer - Adds tile layer.
-
cameraPositionForGeometry(
Geometry geometry) → CameraPosition - Calculates the camera position that projects the specified geometry into the current focusRect, or the full view if the focusRect is not set.
-
cameraPositionWithAzimut(
Geometry geometry, {required double azimuth, required double tilt, ScreenRect? focusRect}) → CameraPosition - Return Camera position that projects the specified geometry into the custom focusRect, with custom azimuth and tilt camera parameters. If focus rect is not provided, current focus rect is used.
-
cameraPositionWithFocus(
Geometry geometry, ScreenRect focusRect) → CameraPosition - Calculates the camera position that projects the specified geometry into the custom focusRect.
-
deselectGeoObject(
) → void - Resets the currently selected geo object.
-
isValid(
) → bool - Usable only in runWithBlockUi or listener handlers.
-
move(
CameraPosition cameraPosition) → void - Immediately changes the camera position. Can cancel a previous unfinished movement.
-
moveWithAnimation(
CameraPosition cameraPosition, Animation animation, {MapCameraCallback? cameraCallback}) → void - Changes camera position. Can cancel a previous unfinished movement.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
projection(
) → Projection - Provides map projection
-
removeCameraListener(
MapCameraListener cameraListener) → void - Removes camera listeners.
-
removeInputListener(
MapInputListener inputListener) → void - Removes input listeners.
-
removeTapListener(
LayersGeoObjectTapListener tapListener) → void - Removes a tap listener that is used to obtain brief geo object info.
-
resetMapStyles(
) → void - Resets all JSON style transformations applied to the map.
-
selectGeoObject(
GeoObjectSelectionMetadata selectionMetaData) → void - Selects a geo object with the specified objectId in the specified layerId. If the object is not currently on the screen, it is selected anyway, but the user will not actually see that. You need to move the camera in addition to this call to be sure that the selected object is visible for the user. GeoObjectSelectionMetadata can be extracted from the geo object's metadata container when the user taps on a geo object.
-
set2DMode(
bool enable) → void - Forces the map to be flat. true - All loaded tiles start showing the "flatten out" animation; all new tiles do not start 3D animation. false - All tiles start showing the "rise up" animation.
-
setMapLoadedListener(
MapLoadedListener? mapLoadedListener) → void - Sets a map loaded listener.
-
setMapStyle(
String style) → bool - Applies JSON style transformations to the map. Same as setMapStyle(0, style). Affects VectorMap and Hybrid map types. Set to empty string to clear previous styling. Returns true if the style was successfully parsed, and false otherwise. If the returned value is false, the current map style remains unchanged.
-
setMapStyleWithId(
{required int id, required String style}) → bool - Applies JSON style transformations to the map. Replaces previous styling with the specified ID (if such exists). Stylings are applied in an ascending order. Affects VectorMap and Hybrid map types. Set to empty string to clear previous styling with the specified ID. Returns true if the style was successfully parsed, and false otherwise. If the returned value is false, the current map style remains unchanged.
-
toString(
) → String -
A string representation of this object.
inherited
-
visibleRegionForPosition(
CameraPosition cameraPosition) → VisibleRegion - Return The map region that is visible from the given camera position. Region IS bounded by latitude limits [-90, 90] and IS NOT bounded by longitude limits [-180, 180]. If the longitude exceeds its limits, we see the world's edge and another instance of the world beyond this edge.
-
wipe(
) → void - Erases tiles, caches, etc. Does not trigger the next frame generation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited