GemMapController class Maps & 3D Scene

Controller for a single GemMap instance running on the host platform.

This class should not be instantiated directly. Instead, use the GemMap._onMapCreated callback to obtain an instance of this class.

Inheritance

Properties

camera MapCamera
Get the camera
no setterinherited
cursorScreenPosition Point<int>
Get the cursor screen position. The coordinates are relative to the parent view screen
no setterinherited
devicePixelSize double
The number of device pixels for each logical pixel.
no setter
extensions MapViewExtensions
Get access to MapViewExtensions
no setterinherited
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 setterinherited
mapId int
no setterinherited
maxSlippyZoomLevel double
Get the maximum slippy zoom level. Bigger zoom factor means closer to the map.
no setterinherited
maxZoomLevel int
Get the maximum zoom level. Bigger zoom factor means closer to the map.
no setterinherited
pointerId → dynamic
no setterinherited
preferences MapViewPreferences
Get access to this view's preferences.
no setterinherited
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 setterinherited
slippyZoomLevel double
Get the slippy zoom level.
no setterinherited
viewport RectType<int>
The current viewport of the map view.
no setterinherited
zoomLevel int
Get the zoom level.
no setterinherited

Methods

activateHighlight(List<Landmark> landmarks, {HighlightRenderSettings? renderSettings, int highlightId = 0}) → void
Activate highlight
inherited
activateHighlightOverlayItems(List<OverlayItem> overlayItems, {HighlightRenderSettings? renderSettings, int highlightId = 0}) → void
Activate highlight
inherited
addGeoJsonAsMarkerCollection(String buffer, String name) List<MarkerCollection>
Adds a GeoJSON data buffer as a marker collection.
inherited
alignNorthUp({GemAnimation? animation}) → void
Set the map north-up oriented.
inherited
captureImage() Future<Uint8List?>
Make a screen region capture of the current map in JPEG format.
inherited
centerOnArea(RectangleGeographicArea area, {int zoomLevel = -1, Point<int>? screenPosition, GemAnimation? animation}) → void
Center the view on the given WGS area
inherited
centerOnAreaRect(RectangleGeographicArea area, {required RectType<int> viewRc, int zoomLevel = -1, GemAnimation? animation}) → void
Center the on the given WGS area.
inherited
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.
inherited
centerOnMapRoutes({RouteDisplayMode? displayMode, RectType<int>? screenRect, GemAnimation? animation}) → void
Center on the routes visible on the map.
inherited
centerOnRoute(Route route, {RectType<int>? screenRect, GemAnimation? animation}) → void
Center on the given route.
inherited
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.
inherited
centerOnRoutePart(Route route, int startDist, int endDist, {RectType<int>? screenRect, GemAnimation? animation}) → void
Center on the given route part.
inherited
centerOnRoutes({List<Route>? routes, RouteDisplayMode displayMode = RouteDisplayMode.full, RectType<int>? screenRect, GemAnimation? animation}) → void
Center on the given routes collection.
inherited
cursorSelectionLandmarks() List<Landmark>
Retrieve the list of landmarks under the cursor location.
inherited
cursorSelectionMarkers() List<MarkerMatch>
Retrieves a reference to a list of markers under the current cursor location.
inherited
cursorSelectionOverlayItems() List<OverlayItem>
Retrieve the list of overlay items under the cursor location.
inherited
cursorSelectionOverlayItemsByType(CommonOverlayId overlayId) List<OverlayItem>
Retrieve the list of overlay items under the cursor location.
inherited
cursorSelectionRoutes() List<Route>
Retrieve the list of routes under the cursor location.
inherited
cursorSelectionStreets() List<Landmark>
Retrieve the list of streets under the cursor location.
inherited
deactivateAllHighlights() → void
Disable highlighting.
inherited
deactivateHighlight({int? highlightId}) → void
Disable highlighting.
inherited
disableDrawMarkersMode() List<Landmark>
Disables the draw markers mode.
inherited
dispose() Future<void>
enableDrawMarkersMode({MarkerCollectionRenderSettings? renderSettings}) → void
Allows the user to draw markers on the map using touch gestures.
inherited
getHighlightArea({int highlightId = 0}) RectangleGeographicArea?
Get highlighted geographic area.
inherited
getNearestLocations(Coordinates coords) List<Landmark>
Retrieve the set of landmarks on the specified coordinates.
inherited
getTransferStatistics(ViewOnlineServiceType type) TransferStatistics
Get data transfer statistics for this service.
inherited
handleEvent(Map arguments) → void
React to view events and call the listener functions.
inherited
handleTouchEvent(int pointerIndex, int touchType, int x, int y) GemError
Handle a touch event.
inherited
highlightHoveredMapLabel(Point<int> screenPosition, {bool selectMapObject = false}) GemError
Highlight the hovered map label under the given screen coordinates.
inherited
isDefaultFollowingPosition() bool
Returns true if the camera is following the current real/simulated position in default auto-zoom mode and false otherwise.
inherited
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.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCursorSelectionUpdatedLandmarks(List<Landmark> landmarks) → void
onCursorSelectionUpdatedMapSceneObject(MapSceneObject mapSceneObject) → void
onCursorSelectionUpdatedMarkers(List<MarkerMatch> markerMatches) → void
onCursorSelectionUpdatedOverlayItems(List<OverlayItem> overlayItems) → void
onCursorSelectionUpdatedPath(Path path) → void
onCursorSelectionUpdatedRoutes(List<Route> routes) → void
onCursorSelectionUpdatedTrafficEvents(List<TrafficEvent> trafficEvents) → void
onDoubleTouch(Point<int> pos) → void
onFollowPositionState(FollowPositionState followPositionState) → void
onHoveredMapLabelHighlightedLandmark(Landmark object) → void
onHoveredMapLabelHighlightedOverlayItem(OverlayItem object) → void
onHoveredMapLabelHighlightedTrafficEvent(TrafficEvent object) → void
onLongPress(Point<int> pos) → void
onMapAngleUpdate(double angle) → void
onMarkerRender(dynamic data) → void
External rendering for custom markers notification
onMove(Point<num> startPoint, Point<num> endPoint) → void
onPinch(Point<int> start1, Point<int> start2, Point<int> end1, Point<int> end2, Point<int> center) → void
onPinchSwipe(Point<int> centerPosInPix, double zoomingSpeedInMMPerSec, double rotatingSpeedInMMPerSec) → void
onPointerDown(int pointerId, Point<num> pos) → void
onPointerMove(int pointerId, Point<num> pos) → void
onPointerUp(int pointerId, Point<num> pos) → void
onRenderMapScale(int scaleWidth, int scaleValue, String scaleUnits) → void
onSetMapStyle(int id, String stylePath, bool viaApi) → void
onShove(double pointersAngleDeg, Point<int> initial, Point<int> start, Point<int> end) → void
onSwipe(int distX, int distY, double speedMmPerSec) → void
onTouch(Point<int> pos) → void
onTouchHandlerModifyFollowPosition(FollowPositionState followPositionState) → void
onTouchMove(Point<int> startPos, Point<int> endPos) → void
onTouchPinch(Point<int> start1, Point<int> start2, Point<int> end1, Point<int> end2) → void
onTwoDoubleTouches(Point<int> pos) → void
onTwoTouches(Point<int> pos) → void
onViewportResized(Rectangle<int> viewportIn) → void
onViewRendered(dynamic data) → void
Called by the View after rendering is finished
registerCursorSelectionMapSceneObjectCallback(CursorSelectionCallback<MapSceneObject>? cursorSelectionMapSceneObjectCallback) → void
This is called by the map view when the cursor is over the map scene object
registerCursorSelectionUpdatedLandmarksCallback(CursorSelectionCallback<List<Landmark>>? cursorSelectionLandmarksCallback) → void
This is called by the map view when the cursor is over a set of landmarks
registerCursorSelectionUpdatedMarkersCallback(CursorSelectionCallback<List<MarkerMatch>>? cursorSelectionMarkersCallback) → void
This is called by the map view when the cursor is over a set of markers
registerCursorSelectionUpdatedOverlayItemsCallback(CursorSelectionCallback<List<OverlayItem>>? cursorSelectionOverlayItemsCallback) → void
This is called by the map view when the cursor is over a set of traffic events
registerCursorSelectionUpdatedPathCallback(CursorSelectionCallback<Path>? cursorSelectionPathCallback) → void
This is called by the map view when the cursor is over a path
registerCursorSelectionUpdatedRoutesCallback(CursorSelectionCallback<List<Route>>? cursorSelectionRoutesCallback) → void
This is called by the map view when the cursor is over a set of routes
registerCursorSelectionUpdatedTrafficEventsCallback(CursorSelectionCallback<List<TrafficEvent>>? cursorSelectionRouteTrafficCallback) → void
This is called by the map view when the cursor is over a set of traffic events
registerDoubleTouchCallback(TouchCallback? doubleTouchCallback) → void
Single pointer double touch event.
registerFollowPositionStateCallback(FollowPositionStateCallback? followPositionStateUpdatedCallback) → void
This is called by the map view when it enters/exits the following position
registerHoveredMapLabelHighlightedLandmarkCallback(HoveredMapLabelHighlightedLandmarkCallback? hoveredMapLabelHighlightedLandmarkCallback) → void
This is called by the map view when a map label hovering was enabled
registerHoveredMapLabelHighlightedOverlayItemCallback(HoveredMapLabelHighlightedOverlayItemCallback? hoveredMapLabelHighlightedOverlayItemCallback) → void
This is called by the map view when a map label hovering was enabled
registerHoveredMapLabelHighlightedTrafficEventCallback(HoveredMapLabelHighlightedTrafficEventCallback? hoveredMapLabelHighlightedTrafficEventCallback) → void
This is called by the map view when a map label hovering was enabled
registerLongPressCallback(TouchCallback? touchCallback) → void
Single pointer long touch event.
registerMapAngleUpdateCallback(MapAngleUpdateCallback? mapAngleUpdatedCallback) → void
This is called by the map view when the map angle is changed
registerMapViewMoveStateChangedCallback(MapViewMoveStateChangedCallback? onMapViewMoveStateChangedCallback) → void
Register to receive move state events from Native side.
registerMoveCallback(MoveCallback? moveCallback) → void
Single pointer move event.
registerPinchCallback(PinchCallback? pinchCallback) → void
Two pointers pinch event.
registerPinchSwipeCallback(PinchSwipeCallback? pinchSwipeCallback) → void
Two pointer rotating and zooming, or just zooming, swipe event.
registerRenderMapScaleCallback(RenderMapScaleCallback? scaleCallback) → void
Called by the map view when map scale needs to be rendered
registerSetMapStyleCallback(SetMapStyleCallback? setMapStyleCallback) → void
Map style changed notification
registerShoveCallback(ShoveCallback? shoveCallback) → void
Called by the map view when a two pointer shove event is triggered
registerSwipeCallback(SwipeCallback? swipeCallback) → void
Single pointer swipe (fling) event.
registerTouchCallback(TouchCallback? touchCallback) → void
Single pointer touch down event.
registerTouchHandlerModifyFollowPositionCallback(FollowPositionStateCallback? touchHandlerModifyFollowPositionCallback) → void
This is called by the map view when camera entered/exited manually adjusted following position
registerTouchMoveCallback(MoveCallback? touchMoveCallback) → void
Single pointer touch move event.
registerTouchPinchCallback(TouchPinchCallback? touchPinchCallback) → void
Two pointers touch pinch event.
registerTwoDoubleTouchesCallback(TouchCallback? twoDoubleTouchCallback) → void
Two pointers double touch event.
registerTwoTouchesCallback(TouchCallback? twoTouchCallback) → void
Two pointers touch event.
registerViewportResizedCallback(ViewportResizedCallback? viewportResizedCallback) → void
Notifies that canvas was resized because of the screen resize
registerViewRenderedCallback(MapViewRenderedCallback? onMapViewRenderedCallback) → void
Register to receive view rendered events from Native side
resetMapSelection() Future<void>
Sets the cursor screen position to the default location (the center of viewport).
inherited
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.
inherited
scroll({required double dx, required double dy}) → void
Scroll map.
inherited
setCursorScreenPosition(Point<int> screenPosition) Future<void>
Set the cursor screen position.
inherited
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.
inherited
setZoomLevel(int zoomLevel, {int duration = 0, Point<int>? screenPosition}) int
Set a new zoom level centered on the specified screen position.
inherited
skipAnimation({bool jumpToDestination = true}) → void
Stop the current animation
inherited
startFollowingPosition({GemAnimation? animation, int zoomLevel = -1, double? viewAngle, MapSceneObject? positionObj}) → void
Start following the current position.
inherited
stopFollowingPosition() → void
Stop the camera from following the current real/simulated position.
inherited
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.
inherited
transformWgsListToScreen(List<Coordinates> coords) List<Point<int>>
Convert a list of WGS84 coordinates to screen coordinates.
inherited
transformWgsToScreen(Coordinates coords) Point<int>
Convert a WGS84 coordinate to a screen coordinate.
inherited

Operators

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