Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Add annotation movement example #27

Closed
wants to merge 3 commits into from
Closed

Conversation

friedbunny
Copy link
Contributor

@friedbunny friedbunny commented Aug 11, 2016

Fixes #24. This is a very rough example that’s not ready for prime time. For now, this is a proof of concept.

The performance problems with this example are tracked upstream in mapbox/mapbox-gl-native#5645.

See AnnotationMovementExample.swift for the initial implementation.

Notes

  • The GeoJSON track has been smoothed by adding points at evenly spaced intervals.
  • If interaction is disabled, this example is fine.
  • If you pan the map, the annotation view lazily lags behind, then catches up.
  • Zooming, panning, and rotating all cause the annotation to veer off course.
  • Simply setting the center coordinate of the map view works fairly well.
  • Animating the view and the map center is very expensive — 30-40% CPU on my iPhone 6s.

/cc @frederoni @1ec5 @pveugen

@friedbunny
Copy link
Contributor Author

Here’s a video of this first cut in action. It’s entertaining, but bad. Dragging the map and having it snap back is oddly satisfying...

@friedbunny
Copy link
Contributor Author

friedbunny commented Aug 30, 2016

I plan on coming back to this once mapbox/mapbox-gl-native#6215 is widely available.

@friedbunny friedbunny removed their assignment Mar 29, 2017

do {
// Load and serialize the GeoJSON into a dictionary filled with properly-typed objects.
if let jsonDict = try NSJSONSerialization.JSONObjectWithData(jsonData!, options: []) as? NSDictionary {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code needs to be eviscerated along the lines of #78, now that GeoJSON deserialization is built into the SDK.

@friedbunny
Copy link
Contributor Author

So very stale.

@friedbunny friedbunny closed this Apr 19, 2018
@friedbunny friedbunny deleted the fb-annotation-movement branch April 19, 2018 18:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants