iOS - MapBox pass custom info through annotation

霸气de小男生 提交于 2020-01-04 05:23:04

问题


I am using MapBox and I would like to pass custom information through an AnnotationPoint. I need that information to display a custom view when the annotation callout is tapped.

The only accessible information is title and subtitle, but that information is displayed in the callout view. This information has to be hidden.

How could I achieve this?


回答1:


You want to subclass the annotation class to add your own properties. Then, in the delegate methods, you can check the type of the annotations passed in, cast them as necessary, and then read the property values in order to act accordingly.



来源:https://stackoverflow.com/questions/34425217/ios-mapbox-pass-custom-info-through-annotation

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