{"action":"created","issue":{"url":"https://api.github.com/repos/choefele/CCHMapClusterController/issues/58","repository_url":"https://api.github.com/repos/choefele/CCHMapClusterController","labels_url":"https://api.github.com/repos/choefele/CCHMapClusterController/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/choefele/CCHMapClusterController/issues/58/comments","events_url":"https://api.github.com/repos/choefele/CCHMapClusterController/issues/58/events","html_url":"https://github.com/choefele/CCHMapClusterController/issues/58","id":46916046,"number":58,"title":"iOS Example: Tapping \"Reset\" button results in another bunch of annotations added to the map without clearing the old ones.","user":{"login":"grigorye","id":803905,"avatar_url":"https://avatars.githubusercontent.com/u/803905?v=3","gravatar_id":"","url":"https://api.github.com/users/grigorye","html_url":"https://github.com/grigorye","followers_url":"https://api.github.com/users/grigorye/followers","following_url":"https://api.github.com/users/grigorye/following{/other_user}","gists_url":"https://api.github.com/users/grigorye/gists{/gist_id}","starred_url":"https://api.github.com/users/grigorye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grigorye/subscriptions","organizations_url":"https://api.github.com/users/grigorye/orgs","repos_url":"https://api.github.com/users/grigorye/repos","events_url":"https://api.github.com/users/grigorye/events{/privacy}","received_events_url":"https://api.github.com/users/grigorye/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/choefele/CCHMapClusterController/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-10-27T15:04:46Z","updated_at":"2016-03-14T14:32:23Z","closed_at":null,"body":"Tapping \"Reset\" button results in another bunch of annotations added to the map without clearing the old ones.\r\n\r\nSteps to reproduce:\r\n\r\n1. Launch CCHMapClusterController Example iOS\r\n2. Wait for map fully loaded\r\n3. Tap \"Reset\"\r\n\r\nExpected results:\r\nMap is reloaded with the same number of annotations\r\n\r\nActual results:\r\nThe same number of annotations is added to the map, doubling the numbers displayed for the first time, 3x, 4x and so on, every time you tap \"Reset\".\r\n\r\n![2014-10-27 18 03 12](https://cloud.githubusercontent.com/assets/803905/4792956/6c31caf0-5dea-11e4-8506-a3b5d24483f8.png)\r\n![2014-10-27 18 03 02](https://cloud.githubusercontent.com/assets/803905/4792958/6ceee59a-5dea-11e4-85be-702e50909993.png)\r\n![2014-10-27 18 02 55](https://cloud.githubusercontent.com/assets/803905/4792957/6ce35086-5dea-11e4-9b0d-bf96a5cb9e42.png)\r\n"},"comment":{"url":"https://api.github.com/repos/choefele/CCHMapClusterController/issues/comments/196334982","html_url":"https://github.com/choefele/CCHMapClusterController/issues/58#issuecomment-196334982","issue_url":"https://api.github.com/repos/choefele/CCHMapClusterController/issues/58","id":196334982,"user":{"login":"bhapca","id":7116742,"avatar_url":"https://avatars.githubusercontent.com/u/7116742?v=3","gravatar_id":"","url":"https://api.github.com/users/bhapca","html_url":"https://github.com/bhapca","followers_url":"https://api.github.com/users/bhapca/followers","following_url":"https://api.github.com/users/bhapca/following{/other_user}","gists_url":"https://api.github.com/users/bhapca/gists{/gist_id}","starred_url":"https://api.github.com/users/bhapca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhapca/subscriptions","organizations_url":"https://api.github.com/users/bhapca/orgs","repos_url":"https://api.github.com/users/bhapca/repos","events_url":"https://api.github.com/users/bhapca/events{/privacy}","received_events_url":"https://api.github.com/users/bhapca/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T14:32:22Z","updated_at":"2016-03-14T14:32:22Z","body":"I can reproduce it consistently on the simulator iOS 9.2 (13C75). It seems to be a problem with MKPointAnnotation, which gets added to the set of annotations without detecting duplicates. \r\n\r\nOverriding the hash and isEqual as I did in 539c98b seems to be fixing the problem."}}