{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/877","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/877/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/877/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/877/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/877","id":57658150,"number":877,"title":"annotations plan","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":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/feature","name":"feature","color":"0052cc"},{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/iOS","name":"iOS","color":"207de5"}],"state":"open","locked":false,"assignee":null,"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","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/5/labels","id":978852,"number":5,"title":"iOS Beta","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":28,"closed_issues":0,"state":"open","created_at":"2015-02-13T19:24:01Z","updated_at":"2015-02-27T22:32:54Z","due_on":"2015-03-17T07:00:00Z","closed_at":null},"comments":23,"created_at":"2015-02-13T21:44:31Z","updated_at":"2015-03-02T21:15:40Z","closed_at":null,"body":"\"Annotations\" is iOS-speak for points and polygons on the basemap with a high-level client-side API. \r\n\r\n* **Data** — This encapsulates such things as client-side data (#507) or formats like GeoJSON, and also includes programmatic addition of points and polygons that don't exist in files or formats at all (e.g. show user location, add these stores to the map, trace this route from parsed directions API). In fact, format-less features are the MVP for this. Spatial indexing falls under this category as well — the system needs to know what's on screen right now as well as be able to translate between pixel-space and geo-space (https://github.com/mapbox/mapbox-gl-native/pull/853). \r\n\r\n* **Design** — Polylines & polygons can get styling properties like width, fill color, opacity, and stroke color. This can change at runtime, so it's not part of the GL style. Markers can get a) static marker imagery, b) iOS `UIView` objects, or even c) animations of views. These can also all change / be provided at runtime. Markers always remain upright when the map rotates and order themselves in the z-axis from current top-to-bottom of screen, updating continuously as the map rotates. Lastly, marker annotations have callouts, which should be implemented specific to iOS (likely using [`SMCalloutView`](https://github.com/nfarina/calloutview) as our SDK does). \r\n\r\n* **Interaction** — Users can tap on poly & marker visuals and get callbacks with the associated data object referenced. \r\n\r\n* **API** — All APIs follow [Apple's MapKit](https://developer.apple.com/library/ios/documentation/MapKit/Reference/MapKit_Framework_Reference/index.html#//apple_ref/doc/uid/TP40008210), so relevant classes & protocols are `MKMapView`, `MKAnnotation`, `MKAnnotationView`, and `MKMapViewDelegate`. \r\n\r\n  - An `MKAnnotation`-derived data object is added (`map.addAnnotation(foo)`) .\r\n  - An `MKMapViewDelegate` is set on a map (`map.delegate = bar`). \r\n  - When the visual for an annotation is relevant/on screen, a view is requested from the delegate, which creates it on the fly (`func mapView(map, viewForAnnotation: foo)`). \r\n  - The map maintains and responds to annotation selection state (`func mapView(map, didSelectAnnotation:foo)`)\r\n\r\nWill kick off deeper tickets for each of these buildouts as we progress. \r\n\r\n![](https://github.com/mapbox/weekend-picks-template-ios/raw/master/screenshot.png)"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/76825286","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/877#issuecomment-76825286","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/877","id":76825286,"user":{"login":"bleege","id":989928,"avatar_url":"https://avatars.githubusercontent.com/u/989928?v=3","gravatar_id":"","url":"https://api.github.com/users/bleege","html_url":"https://github.com/bleege","followers_url":"https://api.github.com/users/bleege/followers","following_url":"https://api.github.com/users/bleege/following{/other_user}","gists_url":"https://api.github.com/users/bleege/gists{/gist_id}","starred_url":"https://api.github.com/users/bleege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleege/subscriptions","organizations_url":"https://api.github.com/users/bleege/orgs","repos_url":"https://api.github.com/users/bleege/repos","events_url":"https://api.github.com/users/bleege/events{/privacy}","received_events_url":"https://api.github.com/users/bleege/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T21:15:40Z","updated_at":"2015-03-02T21:15:40Z","body":"Status Update: I've built the basic logging of an array of LatLng managed at the Core GL layer as directed by CADisplayLink in UIKit.  Initial indications are that they are firing per frame as desired.  More worked (see below) is required to finish this test off:\r\n\r\n* [ ] Clean up array passing\r\n* [ ] Implement conversion logic in Core GL\r\n  * This will be the big \"lag\" test after it's completed.\r\n"}}