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

Fixed polyline equality #8355

Merged
merged 1 commit into from
Mar 10, 2017

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Mar 10, 2017

Now that annotation classes override -isEqual:, it’s no longer appropriate to rely on -isEqual: or -containsObject: to check for the preexistence of an annotation. Those methods become deep equality tests, which have worse performance. Checking for identity allows the developer to add a polyline and polygon with identical coordinates, title, etc. to the map.

Implemented a missing -[MGLPolyline isEqual:].

Removed outdated comments about -annotationTagForAnnotation: being expensive, which is no longer true as of #6957.

Fixes #7811.

/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 runtime styling labels Mar 10, 2017
@1ec5 1ec5 added this to the ios-v3.5.0 milestone Mar 10, 2017
@1ec5 1ec5 self-assigned this Mar 10, 2017
@1ec5 1ec5 requested review from boundsj and frederoni March 10, 2017 22:29
@mention-bot
Copy link

@1ec5, thanks for your PR! By analyzing this pull request, we identified @incanus, @boundsj and @friedbunny to be potential reviewers.

Now that annotation classes override -isEqual:, it’s no longer appropriate to rely on -isEqual: or -containsObject: to check for the preexistence of an annotation. Those methods become deep equality tests, which have worse performance. Checking for identity allows the developer to add a polyline and polygon with identical coordinates, title, etc. to the map.

Implemented a missing -[MGLPolyline isEqual:].

Removed outdated comments about -annotationTagForAnnotation: being expensive.
@1ec5 1ec5 force-pushed the 1ec5-annotation-dedupe-7811 branch from c10c57b to 72ea6b8 Compare March 10, 2017 22:31
@1ec5 1ec5 merged commit b74d7bf into release-ios-v3.5.0-android-v5.0.0 Mar 10, 2017
@1ec5 1ec5 deleted the 1ec5-annotation-dedupe-7811 branch March 10, 2017 23:08
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 runtime styling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants