GemView class abstract Maps & 3D Scenes

Provides comprehensive map view control and customization for interactive mapping.

An abstract class implemented by GemMapController that enables full control over map visualization and interaction. Supports operations including viewport management, camera positioning (zoom, rotate, tilt), animated transitions, coordinate transformations, and map object selection (landmarks, routes, markers).

The map appearance is fully customizable through the preferences property, allowing control over visible map elements, styling, colors, line widths, and elements display settings.

Key capabilities include:

See also:

Implementers

Properties

camera MapCamera
Retrieves the current map camera for advanced positioning and orientation control.
getter/setter pair
cursorScreenPosition Point<int>
Retrieves the cursor's current position in screen coordinates.
no setter
cursorWgsPosition Coordinates
Retrieves the cursor's current position in WGS84 geographic coordinates.
no setter
extensions MapViewExtensions
Retrieves the map view extensions for additional functionality.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasTerrainTopography bool
Check if map view contains terrain topography information
no setter
isAnimationInProgress bool
Checks whether a map animation is currently in progress.
no setter
isCameraMoving bool
Checks whether the map camera is currently moving.
no setter
isFollowingPosition bool
Checks if the camera is actively following the current position.
no setter
isRenderEnabled bool
Checks if map rendering is currently enabled.
getter/setter pair
mapAngle double
Map rotation angle in degrees.
no setter
mapId int
no setter
maxSlippyZoomLevel double
Retrieves the maximum slippy tile zoom level for the map view.
no setter
maxZoomLevel int
Retrieves the maximum configured zoom level for the map view.
getter/setter pair
minZoomLevel int
Retrieves the minimum configured zoom level for the map view.
getter/setter pair
pointerId → dynamic
no setter
preferences MapViewPreferences
Retrieves the map view's customization preferences.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
Current map view scale expressed as meters per millimeter on screen.
no setter
slippyZoomLevel double
Retrieves the current slippy tile zoom level of the map view.
no setter
viewAngle double
Returns the camera's pitch (view angle) in degrees.
no setter
viewport Rectangle<int>
Retrieves the current viewport dimensions in physical pixels.
no setter
viewportCenter Point<int>
Calculates the center point of the current viewport.
no setter
viewportF Rectangle<double>
Retrieves the current viewport dimensions as ratios relative to the parent screen.
no setter
zoomLevel int
Retrieves the current zoom level of the map view.
no setter

Methods

activateHighlight(List<Landmark> landmarks, {HighlightRenderSettings? renderSettings, int highlightId = 0}) → void
Activates highlighting for a collection of landmarks with custom rendering.
activateHighlightOverlayItems(List<OverlayItem> overlayItems, {HighlightRenderSettings? renderSettings, int highlightId = 0}) → void
Activates highlighting for a collection of overlay items with custom rendering.
addGeoJsonAsMarkerCollection(String buffer, String name) List<MarkerCollection>
Imports a GeoJSON data buffer as a MarkerCollection list.
alignNorthUp({GemAnimation? animation}) → void
Aligns the map to north-up orientation.
canZoom(int zoomLevel, {Point<int>? screenPosition}) bool
Checks if zooming to a specified level is possible.
captureImage() Future<Uint8List?>
Make a screen region capture of the current map in JPEG format.
centerOnArea(RectangleGeographicArea area, {int zoomLevel = -1, Point<int>? screenPosition, GemAnimation? animation}) → void
Centers the map view on a specified geographic area rectangle.
centerOnAreaRect(RectangleGeographicArea area, {required Rectangle<int> viewRc, int zoomLevel = -1, GemAnimation? animation}) → void
Centers a geographic area within a specified screen rectangle region.
centerOnCoordinates(Coordinates coords, {int zoomLevel = -1, Point<int>? screenPosition, GemAnimation? animation, double? mapAngle, double? viewAngle, double slippyZoomLevel = -1.0}) → void
Centers the map view on specified WGS84 geographic coordinates.
centerOnMapRoutes({RouteDisplayMode? displayMode, Rectangle<int>? screenRect, GemAnimation? animation}) → void
Centers the map on all routes currently visible in the MapViewRoutesCollection.
centerOnRoute(Route route, {Rectangle<int>? screenRect, GemAnimation? animation}) → void
Centers the map view on an entire route with automatic zoom adjustment.
centerOnRouteInstruction(RouteInstruction routeInstruction, {double zoomLevel = -1, Point<int> screenPosition = const Point<int>(0, 0), double? viewAngle, GemAnimation? animation}) → void
Centers the map on a specific route instruction with visual indicator.
centerOnRoutePart(Route route, int startDist, int endDist, {Rectangle<int>? screenRect, GemAnimation? animation}) → void
Centers the map view on a specific segment of a route with automatic zoom.
centerOnRoutes({List<Route>? routes, RouteDisplayMode displayMode = RouteDisplayMode.full, Rectangle<int>? screenRect, GemAnimation? animation}) → void
Centers the map on multiple routes simultaneously with automatic zoom.
centerOnRouteTrafficEvent(RouteTrafficEvent routeTrafficEvent, {double zoomLevel = -1, Rectangle<int> rectangle = const Rectangle<int>(0, 0, 0, 0), double? viewAngle, GemAnimation? animation}) → void
Centers the map on a traffic event along a route.
checkObjectVisibility({MapSceneObject? mapSceneObject, Rectangle<int>? rect}) bool
Checks if a map scene object is visible within a specified viewport rectangle.
clearRouteInstruction() → void
Removes the route instruction highlight created by centerOnRouteInstruction.
cursorSelectionLandmarks() List<Landmark>
Retrieve the list of landmarks under the cursor location.
cursorSelectionMapSceneObject() MapSceneObject?
Retrieves the scene object under the current cursor selection
cursorSelectionMarkers() List<MarkerMatch>
Retrieves a reference to a list of markers under the current cursor location.
cursorSelectionOverlayItems() List<OverlayItem>
Retrieve the list of overlay items under the cursor location.
cursorSelectionOverlayItemsByType(CommonOverlayId overlayId) List<OverlayItem>
Retrieves overlay items of a specific type under the cursor location.
cursorSelectionPath() Path?
Retrieve the path under the cursor location.
cursorSelectionRoutes() List<Route>
Retrieve the list of routes under the cursor location.
cursorSelectionStreets() List<Landmark>
Retrieve the list of streets under the cursor location.
cursorSelectionTrafficEvents() List<TrafficEvent>
Retrieve the list of traffic events under the cursor location.
deactivateAllHighlights() → void
Deactivates all highlight collections simultaneously.
deactivateHighlight({int? highlightId}) → void
Deactivates highlighting for a specific highlight collection.
disableDrawMarkersMode() List<Landmark>
Disables marker drawing mode and retrieves the drawn landmarks.
dispose() FutureOr<void>
inherited
enableDrawMarkersMode({MarkerCollectionRenderSettings? renderSettings}) → void
Enables interactive marker drawing mode using touch gestures.
getAltitude(Coordinates coordinates) double
Retrieves the altitude at specified geographic coordinates.
getHighlight(int highlightId) List<Landmark>
Retrieves the landmarks in a highlighted collection.
getHighlightArea({int highlightId = 0}) RectangleGeographicArea?
Retrieves the geographic bounds of a highlighted collection.
getIsFollowingPosition(bool alsoFlyToPosition) bool
Checks if the camera is following the current position with optional animation consideration.
getNearestLocations(Coordinates coords, {List<int> lmkStoreTypesIds = const <int>[], int radius = 0}) List<Landmark>
Retrieves nearby landmarks at specified geographic coordinates.
getOptimalHighlightCenterViewport({Rectangle<int>? screenRect}) Rectangle<int>
Calculates the optimal viewport for displaying all highlighted elements.
getOptimalRoutesCenterViewport(List<Route> routes, {Rectangle<int>? screenRect}) Rectangle<int>
Calculates the optimal viewport for displaying multiple routes.
getTransferStatistics(ViewOnlineServiceType type) TransferStatistics
Retrieves data transfer statistics for a specific online service.
getVisibleRouteInterval(Route route, {Rectangle<int>? screenRect}) → (int, int)
Determines which segment of a route is visible within a screen rectangle.
handleEvent(Map arguments) → void
React to view events and call the listener functions.
handleTouchEvent(int pointerIndex, int touchType, int x, int y) GemError
Handle a touch event delivered to the map view.
highlightHoveredMapLabel(Point<int> screenPosition, {bool selectMapObject = false}) GemError
Highlights a map label at the specified screen coordinates.
isDefaultFollowingPosition() bool
Checks if follow position mode is active in its default auto-zoom configuration.
isFollowingPositionTouchHandlerModified() bool
Checks if follow position mode has been manually adjusted by user input.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetMapSelection() Future<void>
Resets the cursor to its default position at the viewport center.
restoreFollowingPosition({GemAnimation? animation}) → void
Restores follow position mode to its default auto-zoom configuration.
setClippingArea(Rectangle<double> area) → void
Sets the view clipping rectangle using parent screen ratio coordinates.
setCursorScreenPosition(Point<int> screenPosition) Future<void>
Updates the cursor's screen position for map selection.
setSlippyZoomLevel(double zoomLevel, {int duration = 0, Point<int>? screenPosition}) double
Sets the map zoom level using slippy tile-based zoom scale.
setZoomLevel(int zoomLevel, {int duration = 0, Point<int>? screenPosition}) int
Sets the map zoom level centered on a specified screen position.
skipAnimation({bool jumpToDestination = true}) → void
Terminates the current map animation.
startFollowingPosition({GemAnimation? animation, int zoomLevel = -1, double? viewAngle, MapSceneObject? positionObj}) → void
Activates follow position mode to track the current location.
stopFollowingPosition({bool restoreCameraMode = false}) → void
Deactivates follow position mode, stopping position tracking.
toString() String
A string representation of this object.
inherited
transformScreenToWgs(Point<int> screenCoordinates) Coordinates
Converts screen coordinates to WGS84 geographic coordinates.
transformScreenToWgsRect({Rectangle<int>? screenRect}) RectangleGeographicArea
Converts a screen rectangle to a geographic area.
transformWgsListToScreen(List<Coordinates> coords) List<Point<int>>
Converts multiple WGS84 geographic coordinates to screen coordinates in batch.
transformWgsToScreen(Coordinates coords) Point<int>
Converts WGS84 geographic coordinates to screen coordinates.

Operators

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