X
X
xerasy2019-04-03 15:04:34
Yandex maps
xerasy, 2019-04-03 15:04:34

Swift yandex map how to put a label on tap?

I can’t figure out how to put a label on a tap, namely, how to get the coordinates of a tap on the map
, I put the label itself like this:

let mapObjects = mapView.mapWindow.map.mapObjects
        mapObjects.clear()
        let placemark = mapObjects.addPlacemark(with: point)
        placemark.setIconWith(UIImage(named: "SearchResult")!)

but how to get tapa coordinates? tried this :
subscribed toYMKUserLocationTapListener
let userLocationLayer = mapView.mapWindow.map.userLocationLayer
userLocationLayer.setTapListenerWith(self)

created a function func onUserLocationObjectTap(with point: YMKPoint)
but this function is called when you tap on an existing marker, and not just on the map. Do not tell me how to implement this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question