Can I intercept marker deselect when I tap another marker in Google Maps SDK for iOS?

∥☆過路亽.° 提交于 2019-12-01 11:31:51

The doco for selectedMarker says:

The marker that is selected. Setting this property selects a particular marker, showing an info window on it. If this property is non-nil, setting it to nil deselects the marker, hiding the info window. This property is observable using KVO.

So, you could use Key Value Observing to be notified of changes to selectedMarker. If you use NSKeyValueObservingOptionOld when setting up KVO (described in more detail here), you will be notified of the old value, ie the marker which was deselected.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!