MapViewDelegate
public protocol MapViewDelegate : AnyObject
The MapViewDelegate
will receive events and messages from the MapView
.
-
When a user taps on the
MapView
and one or morePolygon
models are below it, this function will be called.Note: This API is called before the other
tapped
delegate functions, and does not take into account event routing.Declaration
Swift
func tappedPolygons(polygons: [Polygon])
Parameters
polygons
A list of polygons that are under the tap point
-
When a user taps on the
MapView
and one or morePolygon
models are below it, this function will be called for each polygon.Note: The
tapped
api always sends the event to the object that closerst (ontop) of the camera view first.Parameters
mapView
which mapview the user tapped on
polygon
A polygon that was tapped
Return Value
if the delegate accepted he tapped event, returning true will stop the
MapView
from searching for any other element which could have been tapped and calling a delegate function for them. -
When a user taps on the
MapView
and one or moreElement
models are below it, this function will be called for eachElement
Note: The
tapped
api always sends the event to the object that closerst (ontop) of the camera view first.Parameters
mapView
which mapview the user tapped on
element
A
Element
that was tappedReturn Value
if the delegate accepted he tapped event, returning true will stop the
MapView
from searching for any other element which could have been tapped and calling a delegate function for them. -
When a user taps on the
MapView
and the tap hits the map, this function will be called to provide the Core Location Coordinate associated with the position that was tapped. This might be useful for generating coordinates for a GPX file to simulate user location.Declaration
Swift
func tapped(_ mapView: MapView, clCoordinate: CLLocationCoordinate2D)
Parameters
mapView
which mapview the user tapped on
element
the Core Location Coordinate that was tapped
-
When a user moves the camera on the
MapView
, this function will be called.Declaration
Swift
func manipulatedCamera()