I want to animate YMKPlacemarkMapObject
when tapped. I tried, but not working.
func onMapObjectTap(with mapObject: YMKMapObject, point: YMKPoint) -> Bool {
guard let placemark = mapObject as? YMKPlacemarkMapObject else { return false }
let iconStyle: YMKIconStyle = YMKIconStyle()
UIView.animate(withDuration: 1.0, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 5, options: .curveEaseInOut, animations: {
iconStyle.scale = 2
placemark.setIconStyleWith(iconStyle)
}) { _ in
iconStyle.scale = 1
placemark.setIconStyleWith(iconStyle)
}
}
When using Google Maps, I can easily access markers imageView
and transform it. For Yandex Maps I could not find a way to access placemarks
imageView
. Is there a way to access imageView
?