Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 MapBox,我想通过 AnnotationPoint 传递自定义信息。当点击注释标注时,我需要该信息来显示自定义视图。
唯一可访问的信息是标题和副标题,但该信息显示在标注视图中。必须隐藏此信息。
我怎么能做到这一点?
您希望对注释类进行子类化以添加您自己的属性。然后,在委托方法中,您可以检查传入的注释的类型,根据需要进行转换,然后读取属性值以采取相应的行动。