Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Two annotations with identical coordinates but different titles are considered equal #8351

Closed
1ec5 opened this issue Mar 10, 2017 · 1 comment
Labels
annotations Annotations on iOS and macOS or markers on Android bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS MapKit parity For feature parity with MapKit on iOS or macOS

Comments

@1ec5
Copy link
Contributor

1ec5 commented Mar 10, 2017

As of #6559, if you create two MGLPointAnnotations with identical coordinates but different titles or subtitles, calling -isEqual: on them will return YES. This means you can’t add both to the same map view, the same behavior noted in #7811. The -isEqual: implementations should consider all the properties of the objects, even ones that don’t get displayed on the map. (For macOS, this includes the tooltip property.)

/cc @frederoni @boundsj

@1ec5 1ec5 added annotations Annotations on iOS and macOS or markers on Android bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS MapKit parity For feature parity with MapKit on iOS or macOS labels Mar 10, 2017
@1ec5
Copy link
Contributor Author

1ec5 commented Mar 10, 2017

Never mind, I missed -[MGLShape isEqual:], which takes care of testing these properties.

@1ec5 1ec5 closed this as completed Mar 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
annotations Annotations on iOS and macOS or markers on Android bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS MapKit parity For feature parity with MapKit on iOS or macOS
Projects
None yet
Development

No branches or pull requests

1 participant