Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

User location puck for course tracking mode [squash] - #2300

Merged
incanus merged 4 commits into
masterfrom
puck
Sep 11, 2015
Merged

incanus merged 4 commits into
masterfrom
puck

Conversation

@friedbunny

Copy link
Copy Markdown
Contributor

Squash of #2233.

  • User location puck for course tracking mode
  • Tilts the user location dot and puck with the map

puckanddot

The puck and dot continue to be drawn as a single UIView (MGLUserLocationAnnotationView), entirely using several stacked CALayer and vectors — no images allowed here.

The pseudo-3D effects for the dot and puck while tilting are accomplished by moving the shadow offset and by vertically shifting the blue dot as pitch changes.

/cc @1ec5 @incanus @mapbox/mobile

@friedbunny friedbunny added feature iOS Mapbox Maps SDK for iOS labels Sep 10, 2015
@friedbunny friedbunny added this to the ios-v2.1.0 milestone Sep 10, 2015
@friedbunny

Copy link
Copy Markdown
Contributor Author

Problems that will have to be addressed later:

  • Accuracy ring does not scale properly when tilted. It's correct at the center of the map, but gets wildly inaccurate as you move the dot towards the top or bottom of the screen.
  • Fake 3D isn't going to work as the pitch approaches 90º. We cap at 60º right now, though. Per User location puck for course tracking mode #2233 (comment).

@friedbunny

Copy link
Copy Markdown
Contributor Author

Found a bug where a tilted off-screen user dot doesn't get reset when the pitch changes. Looking into a fix.

@friedbunny

Copy link
Copy Markdown
Contributor Author

Found a bug where a tilted off-screen user dot doesn't get reset when the pitch changes. Looking into a fix.

Fixed in f502e90.

@incanus

incanus commented Sep 11, 2015

Copy link
Copy Markdown
Contributor

Checking this out.

This exposes the naïveté of the current pitch transform: accuracy ring sizing stays constant, despite vertical screen movement. Still, it looks better pitched than not.
Fix case where moving the tilted dot off-screen, changing the pitch to 0, and then moving the dot back on screen would not reset the pitch of the dot.
@incanus

incanus commented Sep 11, 2015

Copy link
Copy Markdown
Contributor

Accuracy ring does not scale properly when tilted.

Refs #2186, #2045

@incanus

incanus commented Sep 11, 2015

Copy link
Copy Markdown
Contributor

This looks great and I think it's ready. Bummer about the accuracy circle, but that's bigger issues over in #2186 / having a varying meters/pixel at different points on the screen.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature iOS Mapbox Maps SDK for iOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants