-
Notifications
You must be signed in to change notification settings - Fork 1.3k
MGLPointAnnotation Hashable conformance #6677
Comments
Thanks @ollie-eman. I think this will be fixed when #6559 lands. Although, note that in that implementation the hash would not be just a function of coordinate latitude and longitude as you've noted above. |
Great thanks @boundsj. Taking into consideration the hash implementation, do you think it will fix the issue i'm having and enable me to store the annotations in a Set? Also, do you know when it might be available via Cocoapods? |
From what I can tell, yes. Assuming
#6559 fixes #6200 which is currently planned for our next release. |
Fixed in #6559. |
Platform: iOS
Mapbox SDK version: 3.3.4
Steps to trigger behavior
I've created a subclass of
MGLPointAnnotation
namedMyCustomAnnotation
and defined a
Set
to store the annotations, to ensure I don't add any duplicates.Next i've created two annotations:
To insert the annotations:
Expected behavior
The first annotation (
annotationOne
) should be inserted successfully into the Set. The second annotation (annotationTwo
) should not be inserted as an annotation with the same coordinates already exists.Actual behavior
Both annotations are added to the
Set
The text was updated successfully, but these errors were encountered: