Map View
MapView object. It displays a map. MapView 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 MapView objects can be created using the same Screen or a different one.
Properties
The cursor screen position. The coordinates are relative to view parent screen
The list of landmarks under the cursor location.
The list of vectors data under the cursor location.
The list of overlay items under the cursor location.
Retrieve the path under the cursor location.
The list of routes under the cursor location.
Retrieve the scene object under the cursor selection.
The list of streets under the cursor location.
The list of traffic events under the cursor location.
The cursor WGS coordinates. returns ZERO on success else it returns -1. The only case when error occurs is when the cursor is not enabled.
Map customization.
Maximum slippy zoom level. Bigger zoom factor means closer to the map.
Maximum zoom level. Bigger zoom factor means closer to the map.
Raw unprocessed detection of all pointers up from screen. Action where the last pointer goes up and no pointers are left on the screen.
This is called by the map service when the cursor is over a set of view components ( landmarks, markers, streets, vectors ). Current cursor selection can be obtained via MapView.cursorSelection... methods.
This is called by the map view when the cursor is over a set of landmarks. Lambda Signature: (LandmarkList) -> Unit
This is called by the map view when the cursor is over a set of markers. Lambda Signature: (MarkerMatchList) -> Unit
This is called by the map view when the cursor is over a set of overlay items. Lambda Signature: (OverlayItemList) -> Unit
This is called by the map view when the cursor is over a set of routes. Lambda Signature: (RouteList) -> Unit
This is called by the map view when the cursor is over a set of traffic events. Lambda Signature: (TrafficEventList) -> Unit
Single pointer double touch event. Lambda Signature: (pos: Xy) -> Unit A double touch event is defined as two consecutive touches within a preset time duration in milliseconds, and distance between the two touches has to be less than a preset distance in millimeters. "pos" param represents the position where event occurred
This is called by the map view when it enters in following position mode
This is called by the map view when it exits the following position mode
Single pointer long touch event. Lambda Signature: (pos: Xy) -> Unit A long touch event is defined as a pointer down longer than a preset time in milliseconds and then pointer up, and pointer movement has to be less than a preset distance in millimeters. "pos" param represents the position where event occurred
Map angle changed notification
Map style changed notification. Lambda Signature: (styleId : Long, filepath : String) -> Unit "styleId" param represents style content store item id, ContentStoreItem.id "filepath" param represents style local file path, ContentStoreItem.filename
Single pointer move event. Lambda Signature: (start: Xy, end: Xy) -> Unit A single pointer move event is defined as a pointer down, followed by a move, followed by a pointer up. "start" param represents the previous position involved in move action "end" param represents the current position involved in move action
Two pointers pinch event. Lambda Signature: (start1: Xy, start2: Xy, end1: Xy, end2: Xy, center: Xy) -> Unit A two pointers pinch event is defined as two pointers down, followed by moving one or both pointers toward or away from each other. "start1" param represents start of the previous position for first pointer "start2" param represents start of the previous position for second pointer "end1" param represents end of the current position for first pointer "end2" param represents end of the current position for second pointer "center" param represents the rotation center
Touch handler events listener. Lambda Signature: (ptrId: Long, pos: Xy) -> Unit Raw unprocessed pointer down started - used to determine when one of the other processed actions start. Set pointer down flag indicating that action started! The flag is cleared by the actual action, such as OnPinch, when it starts. "ptrId" param represents pointer id. "pos" param represents Xy position of the pointer.
Two pointers shove event. Lambda Signature: (pointersAngleDeg: Double, start: Xy, end: Xy) -> Unit Two pointers move with distance between pointers and pointers angle remaining inside predefined thresholds. "pointersAngleDeg" param represents the angle in degrees determined by the two pointers involved in gesture "initial" is the mid point of the segment determined by the two pointers initial touch down positions "start" param represents the mid point of the segment determined by the two pointers previous positions "end" param represents the mid point of the segment determined by the two pointers current positions
Single pointer swipe event. Lambda Signature: (distX: Int, distY: Int, speedMMPerSec: Double) -> Unit A single pointer swipe event is defined as a pointer down, followed by a swipe/fast move. "distX" param represents the difference in pixels on X axis between last two points involved in move action "distY" param represents the difference in pixels on Y axis between last two points involved in move action "speedMMPerSec" param represents the moving speed in mm / s
Single pointer touch down event. Lambda Signature: (pos: Xy) -> Unit A touch event is defined as a pointer down and up within a preset time in milliseconds, and pointer movement has to be less than a preset distance in millimeters. "pos" param represents the position where event occurred
Single pointer touch move event. Lambda Signature: (start: Xy, end: Xy) -> Unit Touch move mode is enabled by performing a pointer touch immediately followed by a pointer down in same screen area, and then move. "start" param represents the previous position involved in move action "end" param represents the current position involved in move action
Two pointers touch pinch event. Lambda Signature: (start1: Xy, start2: Xy, end1: Xy, end2: Xy) -> Unit Two fingers touch mode is enabled by performing a single pointer touch immediately followed by two pointers down, with one of the pointers close to the previous touch. "start1" param represents start of the previous position for first pointer "start2" param represents start of the previous position for second pointer "end1" param represents end of the current position for first pointer "end2" param represents end of the current position for second pointer
Two pointers double touch event. Lambda Signature: (pos: Xy) -> Unit A two pointers double touch event is defined as two consecutive two-pointer touches from which the pointer ups are within a preset time in milliseconds. "pos" param represents the mid position of the segment determined by the two pointers positions
Two pointers touch event. Lambda Signature: (pos: Xy) -> Unit A two pointers touch event is defined as two simultaneous touches from which the pointer ups are within a preset time in milliseconds. "pos" param represents the mid position of the segment determined by the two pointers positions
Notifies that canvas was resized because of the screen resize. Lambda Signature: (rect: Rect) -> Unit
Called by the View before rendering is started
Called by the View after rendering is finished. Lambda Signature: (EViewDataTransitionStatus, EViewCameraTransitionStatus) -> Unit
View preferences
Get slippy zoom level.
Functions
Enables the highlighting for the given landmark.
Enables the highlighting for the given landmark list.
Enable the highlighting for the given overlay list.
Enables the highlighting for the given overlay list.
Add navigation instruction geometry
Add route geometry
Sets the map north-up oriented
Make a screen region capture of the current map in JPEG format. No cursor/on-screen info is included.
Centers WGS of Area center on screen coordinates. Note: Animation can be used only if automatic map rendering is active.
Centers WGS coordinates on screen coordinates. Animation can be used only if automatic map rendering is active.
Center On the given route parts The zoom level is automatically selected so that the entire route part between start distance and end distance is visible on the map
Center on the given landmark location
Centers WGS of Area center on screen coordinates. Note: Animation can be used only if automatic map rendering is active.
Centers WGS of the geographic area for the route on screen rectangle. The entire route is visible on map. The zoom level is automatically selected so that the entire route is visible on map. Note: Animation can be used only if automatic map rendering is active.
Centers WGS of route description on screen coordinates. The route instruction turn arrow is visible on map. The zoom level is automatically selected so that the entire turn arrow is visible on map. Note: Animation can be used only if automatic map rendering is active.
Centers WGS of the geographic area for the routes list on screen rectangle. All routes from the list will be visible on the map. The zoom level is automatically selected. Note: Animation can be used only if automatic map rendering is active.
Centers the specified route traffic event in screen rectangle. Note: Animation can be used only if automatic map rendering is active.
Disable all highlights
Disable highlighting.
Display overlay item field of view
Adds a path in the collection.
Adds a path in the collection.
Display route in simplified mode
Display route turn arrow in simplified mode
Starts/Stops position follow.
Provides the closest address landmark to the provided coordinates
Get highlight geographic area
Retrieve the set of landmarks on the specified location. This is a Quick synchronous reverse geocoding method.
Gets the optimal highlight center viewport given the user custom input
Gets the highlighted items optimal center viewport given the user custom input.
Gets style layer info at the given coordinates
Get the current tracked positions as a coordinates list
Gets data transfer statistics for a given service.
Get the clipped part of the given route as a xy( startDistance, endDistance)
Handles a keyboard event
Hide custom landmarks
Hides all visible routes.
Highlight the hovered map label under the given screen coordinates
Request redraw.
Check it there is an animation in progress.
Check if view camera is moving
Tests if following the current position.
Test if following the current position is modified by the touch handler.
True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object
Check if tracked position is started in the map view
Presents the provided route on the map. If display bubble is false then no label will be visible.
Presents the provided routes on the map. If display bubble is false then no label will be visible.
Remove all markers
Remove navigation instruction geometry
Remove route geometry
Reset follow position camera focus to center of viewport.
Restore following position from a manually adjusted state
Sets the view clipping rectangle in parent screen ratio
Set the edge area insets in pixels.
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. In rest the screen center will be used. This may be between 0 and maxSlippyZoomLevel.
Sets a new zoom level centered on the specified screen position. This may be between 0 and maxZoomLevel.
Stops the current animation. When this will be finished the animation will be completed with error code GemError.Cancel.
Starts following the current position. Requires automatic map rendering. Disables the cursor if enabled.
Start the sense data source improved position tracking on map by rendering a marker polyline between relevant map links points
Stops following the current position.
Stops the sense data source improved position tracking on map
Converts a point on area where map is rendered into WGS84 coordinates.
Converts a screen rectangle to WGS areas list
Converts coordinates in WGS84 projection system into the coordinate system of the area where the map is rendered.