{"action":"opened","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/6677","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-native","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/6677/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/6677/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/6677/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/6677","id":182525171,"number":6677,"title":"MGLPointAnnotation Hashable conformance","user":{"login":"ollie-eman","id":20243749,"avatar_url":"https://avatars.githubusercontent.com/u/20243749?v=3","gravatar_id":"","url":"https://api.github.com/users/ollie-eman","html_url":"https://github.com/ollie-eman","followers_url":"https://api.github.com/users/ollie-eman/followers","following_url":"https://api.github.com/users/ollie-eman/following{/other_user}","gists_url":"https://api.github.com/users/ollie-eman/gists{/gist_id}","starred_url":"https://api.github.com/users/ollie-eman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ollie-eman/subscriptions","organizations_url":"https://api.github.com/users/ollie-eman/orgs","repos_url":"https://api.github.com/users/ollie-eman/repos","events_url":"https://api.github.com/users/ollie-eman/events{/privacy}","received_events_url":"https://api.github.com/users/ollie-eman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-12T13:26:07Z","updated_at":"2016-10-12T13:26:07Z","closed_at":null,"body":"<!--\r\nHello and thanks for contributing! To help us diagnose your problem quickly, please:\r\n\r\n - Include a minimal demonstration of the bug, including code, logs, and screenshots.\r\n - Ensure you can reproduce the bug using the latest release.\r\n - Only post to report a bug or request a feature; direct all other questions to: https://stackoverflow.com/questions/tagged/mapbox\r\n-->\r\n\r\n**Platform:** iOS\r\n**Mapbox SDK version:** 3.3.4\r\n\r\n### Steps to trigger behavior\r\n\r\nI've created a subclass of `MGLPointAnnotation` named `MyCustomAnnotation`\r\n``` swift\r\nclass MyCustomAnnototation: MGLPointAnnotation { }\r\n```\r\n\r\nand defined a `Set` to store the annotations, to ensure I don't add any duplicates.\r\n``` swift\r\nvar annotations = Set<MyCustomAnnotation>()\r\n```\r\n\r\nNext i've created two annotations:\r\n``` swift\r\nlet coordinate = CLLocationCoordinate2D(latitude: 51.50, longitude: -0.12)\r\nlet annotationOne = MyCustomAnnotation(location: coordinate)\r\nlet annotationTwo = MyCustomAnnotation(location: coordinate)\r\n```\r\n\r\nTo insert the annotations:\r\n``` swift\r\nvar insertionResult = annotations.insert(annotationOne)\r\nif insertionResult.inserted {\r\n    print(\"Annotation one inserted\")\r\n}\r\n\r\ninsertionResult = annotations.insert(annotationTwo)\r\nif insertionResult.inserted {\r\n    print(\"Annotation two inserted\")\r\n}\r\n```\r\n\r\n### Expected behavior\r\nThe 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.\r\n\r\n### Actual behavior\r\nBoth annotations are added to the `Set`\r\n"}}
{"actor":{"display_login":"ollie-eman"}}