{"action":"opened","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/992","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/992/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/992/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/992/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/992","id":60872801,"number":992,"title":"flesh out annotation add/remove client API","user":{"login":"incanus","id":17722,"avatar_url":"https://avatars.githubusercontent.com/u/17722?v=3","gravatar_id":"","url":"https://api.github.com/users/incanus","html_url":"https://github.com/incanus","followers_url":"https://api.github.com/users/incanus/followers","following_url":"https://api.github.com/users/incanus/following{/other_user}","gists_url":"https://api.github.com/users/incanus/gists{/gist_id}","starred_url":"https://api.github.com/users/incanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incanus/subscriptions","organizations_url":"https://api.github.com/users/incanus/orgs","repos_url":"https://api.github.com/users/incanus/repos","events_url":"https://api.github.com/users/incanus/events{/privacy}","received_events_url":"https://api.github.com/users/incanus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"incanus","id":17722,"avatar_url":"https://avatars.githubusercontent.com/u/17722?v=3","gravatar_id":"","url":"https://api.github.com/users/incanus","html_url":"https://github.com/incanus","followers_url":"https://api.github.com/users/incanus/followers","following_url":"https://api.github.com/users/incanus/following{/other_user}","gists_url":"https://api.github.com/users/incanus/gists{/gist_id}","starred_url":"https://api.github.com/users/incanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incanus/subscriptions","organizations_url":"https://api.github.com/users/incanus/orgs","repos_url":"https://api.github.com/users/incanus/repos","events_url":"https://api.github.com/users/incanus/events{/privacy}","received_events_url":"https://api.github.com/users/incanus/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/5","html_url":"https://github.com/mapbox/mapbox-gl-native/milestones/iOS%20Beta%201","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/5/labels","id":978852,"number":5,"title":"iOS Beta 1","description":"","creator":{"login":"incanus","id":17722,"avatar_url":"https://avatars.githubusercontent.com/u/17722?v=3","gravatar_id":"","url":"https://api.github.com/users/incanus","html_url":"https://github.com/incanus","followers_url":"https://api.github.com/users/incanus/followers","following_url":"https://api.github.com/users/incanus/following{/other_user}","gists_url":"https://api.github.com/users/incanus/gists{/gist_id}","starred_url":"https://api.github.com/users/incanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incanus/subscriptions","organizations_url":"https://api.github.com/users/incanus/orgs","repos_url":"https://api.github.com/users/incanus/repos","events_url":"https://api.github.com/users/incanus/events{/privacy}","received_events_url":"https://api.github.com/users/incanus/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":13,"state":"open","created_at":"2015-02-13T19:24:01Z","updated_at":"2015-03-12T18:38:15Z","due_on":"2015-03-17T07:00:00Z","closed_at":null},"comments":0,"created_at":"2015-03-12T18:38:15Z","updated_at":"2015-03-12T18:38:15Z","closed_at":null,"body":"This is the API where platforms (i.e. iOS `MGLMapView` internals) talk to core for manipulating point and shape annotations. \r\n\r\n## Points\r\n\r\n* Set default point annotation symbol name (so system falls back to e.g. a red filled Mapbox marker)\r\n* Add single point annotation as `LatLng` with optional symbol name (from style sprite sheet) upfront\r\n* Add multiples of same (more performant than individual adds in a loop)\r\n* Remove single point annotation\r\n* Remove multiples (more performant than individual removes in a loop)\r\n* Tell single point annotation to move to top in z-order (e.g. selection state)\r\n\r\n## Shapes\r\n\r\n* Add single shape annotation as `std::vector<LatLng>` and draw properties (stroke width, stroke color, fill color) upfront. Need a way to specify interior polygon holes. \r\n* Add multiples of same\r\n* Remove single shape annotation\r\n* Remove multiples\r\n\r\n## Both\r\n\r\n* Obtaining annotations in a given `LatLng` bounding box (enables e.g. `-annotationsInMapRect:`)\r\n* Obtaining bounding box fully encompassing all currently-added annotations (enables e.g. `annotationVisibleRect`)\r\n* Neither of these take symbology into account, just `LatLng`\r\n\r\n## TBD for iOS b1\r\n\r\n* Allow explicit relative ordering of shape annotations within shape annotation layer (e.g. `-insertOverlay:aboveOverlay:` or `-insertOverlay:atIndex:`\r\n* Query with callback for updated symbol name each time point annotation becomes visible again, to give opportunity to update? \r\n* Query with callback for updated stroke/fill properties in same way? \r\n\r\n## iOS b2 or beyond\r\n\r\n* Interlacing of shape overlays with roads & labels base map layers (or other arbitrary layers). This is like MapKit's `-addOverlay:level:` with values like `MKOverlayLevelAboveRoads` or `MKOverlayLevelAboveLabels`. In our case, this would more likely be a style layer name passed as a string. Also enables e.g. `-overlaysInLevel:`. \r\n\r\n/cc @1ec5 "}}