GemView class abstract Maps & 3D Scene

The map view class

This abstract class is implemented by GemMapController

GemView supports a wide range of operations like resize, zoom, rotate, animated fly to specific position or select map objects. The map appearance is fully customizable. By using the attached preferences it is possible to specify for each map what map objects to be visible and when; it is possible to change the colors, widths and other properties of the map objects or to specify which landmarks should be visible on map. Multiple GemView objects can be created.

Implementers

Properties

camera MapCamera
Get the camera
no setter
cursorScreenPosition Point<int>
Get the cursor screen position. The coordinates are relative to the parent view screen
no setter
extensions MapViewExtensions
Get access to MapViewExtensions
no setter
hashCode int
The hash code for this object.
no setterinherited
isFollowingPosition bool
Returns true if the camera is following the current real/simulated position and false otherwise.
no setter
mapId int
no setter
maxSlippyZoomLevel double
Get the maximum slippy zoom level. Bigger zoom factor means closer to the map.
no setter
maxZoomLevel int
Get the maximum zoom level. Bigger zoom factor means closer to the map.
no setter
pointerId → dynamic
no setter
preferences MapViewPreferences
Get access to this view's preferences.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
Get the map view current scale ( meters for 1 mm )
no setter
slippyZoomLevel double
Get the slippy zoom level.
no setter
viewport RectType<int>
The current viewport of the map view.
no setter
zoomLevel int
Get the zoom level.
no setter

Methods

activateHighlight(List<Landmark> landmarks, {HighlightRenderSettings? renderSettings, int highlightId = 0}) → void
Activate highlight
activateHighlightOverlayItems(List<OverlayItem> overlayItems, {HighlightRenderSettings? renderSettings, int highlightId = 0}) → void
Activate highlight
addGeoJsonAsMarkerCollection(String buffer, String name) List<MarkerCollection>
Adds a GeoJSON data buffer as a marker collection.
alignNorthUp({GemAnimation? animation}) → void
Set the map north-up oriented.
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
Center the view on the given WGS area
centerOnAreaRect(RectangleGeographicArea area, {required RectType<int> viewRc, int zoomLevel = -1, GemAnimation? animation}) → void
Center the on the given WGS area.
centerOnCoordinates(Coordinates coords, {int zoomLevel = -1, Point<int>? screenPosition, GemAnimation? animation, double? mapAngle, double? viewAngle, double slippyZoomLevel = -1.0}) → void
Center the WGS coordinates on the screen coordinates.
centerOnMapRoutes({RouteDisplayMode? displayMode, RectType<int>? screenRect, GemAnimation? animation}) → void
Center on the routes visible on the map.
centerOnRoute(Route route, {RectType<int>? screenRect, GemAnimation? animation}) → void
Center on the given route.
centerOnRouteInstruction(RouteInstruction routeInstruction, {double zoomLevel = -1, Point<int> screenPosition = const Point<int>(0, 0), double? viewAngle, GemAnimation? animation}) → void
Center on the given route instruction.
centerOnRoutePart(Route route, int startDist, int endDist, {RectType<int>? screenRect, GemAnimation? animation}) → void
Center on the given route part.
centerOnRoutes({List<Route>? routes, RouteDisplayMode displayMode = RouteDisplayMode.full, RectType<int>? screenRect, GemAnimation? animation}) → void
Center on the given routes collection.
cursorSelectionLandmarks() List<Landmark>
Retrieve the list of landmarks under the cursor location.
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>
Retrieve the list of overlay items 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.
deactivateAllHighlights() → void
Disable highlighting.
deactivateHighlight({int? highlightId}) → void
Disable highlighting.
disableDrawMarkersMode() List<Landmark>
Disables the draw markers mode.
dispose() FutureOr<void>
inherited
enableDrawMarkersMode({MarkerCollectionRenderSettings? renderSettings}) → void
Allows the user to draw markers on the map using touch gestures.
getHighlightArea({int highlightId = 0}) RectangleGeographicArea?
Get highlighted geographic area.
getNearestLocations(Coordinates coords) List<Landmark>
Retrieve the set of landmarks on the specified coordinates.
getTransferStatistics(ViewOnlineServiceType type) TransferStatistics
Get data transfer statistics for this service.
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.
highlightHoveredMapLabel(Point<int> screenPosition, {bool selectMapObject = false}) GemError
Highlight the hovered map label under the given screen coordinates.
isDefaultFollowingPosition() bool
Returns true if the camera is following the current real/simulated position in default auto-zoom mode and false otherwise.
isFollowingPositionTouchHandlerModified() bool
Returns true if the camera is following the current real/simulated position from a fixed relative position adjusted by user input and false otherwise.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCursorSelectionUpdatedLandmarks(List<Landmark> landmarks) → void
inherited
onCursorSelectionUpdatedMapSceneObject(MapSceneObject mapSceneObject) → void
inherited
onCursorSelectionUpdatedMarkers(List<MarkerMatch> markerMatches) → void
inherited
onCursorSelectionUpdatedOverlayItems(List<OverlayItem> overlayItems) → void
inherited
onCursorSelectionUpdatedPath(Path path) → void
inherited
onCursorSelectionUpdatedRoutes(List<Route> routes) → void
inherited
onCursorSelectionUpdatedTrafficEvents(List<TrafficEvent> trafficEvents) → void
inherited
onDoubleTouch(Point<int> pos) → void
inherited
onFollowPositionState(FollowPositionState followPositionState) → void
inherited
onHoveredMapLabelHighlightedLandmark(Landmark object) → void
inherited
onHoveredMapLabelHighlightedOverlayItem(OverlayItem object) → void
inherited
onHoveredMapLabelHighlightedTrafficEvent(TrafficEvent object) → void
inherited
onLongPress(Point<int> pos) → void
inherited
onMapAngleUpdate(double angle) → void
inherited
onMarkerRender(dynamic data) → void
inherited
onMove(Point<int> startPos, Point<int> endPos) → void
inherited
onPinch(Point<int> start1, Point<int> start2, Point<int> end1, Point<int> end2, Point<int> center) → void
inherited
onPinchSwipe(Point<int> centerPosInPix, double zoomingSpeedInMMPerSec, double rotatingSpeedInMMPerSec) → void
inherited
onPointerDown(int pointerId, Point<int> pos) → void
inherited
onPointerMove(int pointerId, Point<int> pos) → void
inherited
onPointerUp(int pointerId, Point<int> pos) → void
inherited
onRenderMapScale(int scaleWidth, int scaleValue, String scaleUnits) → void
inherited
onSetMapStyle(int id, String stylePath, bool viaApi) → void
inherited
onShove(double pointersAngleDeg, Point<int> initial, Point<int> start, Point<int> end) → void
inherited
onSwipe(int distX, int distY, double speedMmPerSec) → void
inherited
onTouch(Point<int> pos) → void
inherited
onTouchHandlerModifyFollowPosition(FollowPositionState followPositionState) → void
inherited
onTouchMove(Point<int> startPos, Point<int> endPos) → void
inherited
onTouchPinch(Point<int> start1, Point<int> start2, Point<int> end1, Point<int> end2) → void
inherited
onTwoDoubleTouches(Point<int> pos) → void
inherited
onTwoTouches(Point<int> pos) → void
inherited
onViewportResized(Rectangle<int> viewport) → void
inherited
onViewRendered(dynamic data) → void
inherited
resetMapSelection() Future<void>
Sets the cursor screen position to the default location (the center of viewport).
restoreFollowingPosition({GemAnimation? animation}) → void
Restore following position from a manually adjusted mode (camera position fixed relative to the current/simulated position) to default auto-zoom mode.
scroll({required double dx, required double dy}) → void
Scroll map.
setCursorScreenPosition(Point<int> screenPosition) Future<void>
Set the cursor screen position.
setSlippyZoomLevel(double zoomLevel, {int duration = 0, Point<int>? screenPosition}) double
Set a new zoom level based on slippy tile level. When 'follow position' is active, the current position will be used as the reference point for the operation. Otherwise, the screen center will be used. The zoom level may be between 0 and MaxSlippyZoomLevel.
setZoomLevel(int zoomLevel, {int duration = 0, Point<int>? screenPosition}) int
Set a new zoom level centered on the specified screen position.
skipAnimation({bool jumpToDestination = true}) → void
Stop the current animation
startFollowingPosition({GemAnimation? animation, int zoomLevel = -1, double? viewAngle, MapSceneObject? positionObj}) → void
Start following the current position.
stopFollowingPosition() → void
Stop the camera from following the current real/simulated position.
toString() String
A string representation of this object.
inherited
transformScreenToWgs(Point<int> screenCoordinates) Coordinates
Convert a screen(x, y) coordinate to a WGS(lon, lat) coordinate.
transformWgsListToScreen(List<Coordinates> coords) List<Point<int>>
Convert a list of WGS84 coordinates to screen coordinates.
transformWgsToScreen(Coordinates coords) Point<int>
Convert a WGS84 coordinate to a screen coordinate.

Operators

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