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

improve synced view tracking #1125

Description

@incanus

General ticket for improvement of "sticking" native, Cocoa-side views to the panning, zooming GL render view.

This relates to the user dot now, later to callouts and annotation views. Let's keep a ticket around until we are 100% satisfied with the behavior here, but we can move it along milestones as we make staged improvements.

Activity

  1. added this to the iOS Beta 1 milestone on Mar 26, 2015
  2. added a commit that references this issue on Mar 27, 2015
  3. incanus commented on Mar 27, 2015

    @incanus
    ContributorAuthor

    I'm feeling pretty good about the current state of tracking, especially after the above commit which avoids invalid CLLocationCoordinate2D-based updates during TransformState "will change" events (and just catches the "did change").

    The one issue I'm seeing which I'd like to clean up is the dot disappearing during e.g. a double-tap animated zoom. It doesn't show up again until the next CLLocationManager update. It gets hidden because the CGPoint received out of -[MGLMapView convertCoordinate:toPointToView:] is well out of range of given screen bounds. I think this is just some sort of math error in TransformState during animations.

  4. incanus commented on Mar 27, 2015

    @incanus
    ContributorAuthor

    Another lead that confirms the above: pan the map until the dot is >150px off screen, then hit the user locate button. The map pans back into view (meaning the map centering to the valid user location is of course working) but the dot doesn't show up until the next CL update post-animation. During the animation it's still residing at the offscreen value, so it's hidden.

  5. incanus commented on Mar 28, 2015

    @incanus
    ContributorAuthor

    Tracking is pretty good right now. Only outstanding issue I'd like to hit for the beta is the dot disappearing briefly during animated zooms (but coming back at least, now). I'm nearing some completion on this but don't want to hold up a build tonight so I'll work on that a bit over the weekend.

    Going to squash & merge a few commits now with improvements thus far.

  6. added a commit that references this issue on Mar 28, 2015
  7. incanus commented on Mar 28, 2015

    @incanus
    ContributorAuthor

    First batch of improvements in #1151.

  8. added a commit that references this issue on Mar 28, 2015
  9. self-assigned this
    on Mar 28, 2015
  10. incanus commented on Mar 30, 2015

    @incanus
    ContributorAuthor

    Main blocker here now captured in the more general #1160 bug with projection conversion.

  11. kkaefer commented on Apr 1, 2015

    @kkaefer
    Member

    FWIW, I think we should get rid of overlaying iOS views onto the Map and instead render everything ourselves. Apple recommends against doing this as well: https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Performance/Performance.html#//apple_ref/doc/uid/TP40008793-CH105-SW8

    For the absolute best performance, your app should rely solely on OpenGL ES to render your content.

  12. incanus commented on Apr 1, 2015

    @incanus
    ContributorAuthor

    Right, but I direct your attention back to https://github.com/incanus/AniAnnoDemo and what needs to happen to make this work :-) The thing I'm most uncertain about is syncing frames of animation from native views into GL. Maybe it's not as terrible as I'm imagining though.

  13. mb12 commented on Apr 2, 2015

    @mb12

    @incanus Perhaps, we should try posting the synchronization problem to Apple developer forums and/or use the 3 incidents that Apple includes in developer support. Apple is already doing this for Mapkit. Its a problem that they have already solved. It would make writing all kind of Map overlays super easy.

    https://developer.apple.com/devforums/

  14. incanus commented on Apr 2, 2015

    @incanus
    ContributorAuthor

    http://stackoverflow.com/a/17096916/977220

    In fact, you can't synchronize them using current APIs. MobileMaps.app and Apple Map Kit use private property on CAEAGLLayer asynchronous to workaround this issue.

    I'm intending to dig deep when the time comes for this, but right now the user dot is syncing well and we just need the bug fix in #1160 for a workable version right now.

    From the POV of annotations, after shapes, this will be my next priority.

  15. incanus commented on Apr 6, 2015

    @incanus
    ContributorAuthor

    On this front, I've been thinking about looking into routes for capture a view's layer's presentationLayer at a given point in time and rasterizing it to a GL render layer. That is, all tracked views atop the GL view will actually get rasterized into a single "layer" in the GL. I have no idea how feasible this is, but is the sort of approach I've been mulling over researching.

  16. 50 remaining items

  17. added a commit that references this issue on Jul 8, 2015
  18. incanus commented on Jul 8, 2015

    @incanus
    ContributorAuthor

    We are good for release-0.5.0 now as of b838816 and a67e802; moving off of milestone.

  19. removed this from the iOS Beta 3 milestone on Jul 8, 2015
  20. ljbade commented on Sep 22, 2015

    @ljbade
    Contributor

    Making note of #2384 as it looks like iOS 9 has some fixes that can be used.

  21. incanus commented on Sep 22, 2015

    @incanus
    ContributorAuthor

    We started looking at that in #1125 (comment) @ljbade. No help currently.

  22. 1ec5 commented on Jan 25, 2016

    @1ec5
    Contributor

    #3683 finally synchronizes the user dot with the map. Keeping this issue open until we’re able to leave callouts open while the viewport moves.

  23. added this to the ios-v3.3.0 milestone on Mar 10, 2016
  24. 1ec5 commented on Mar 11, 2016

    @1ec5
    Contributor

    #3683 has landed and will be in v3.2.0. Closing in favor of #3154.

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

Metadata

Metadata

Assignees

Labels

bugiOSMapbox Maps SDK for iOSperformanceSpeed, stability, CPU usage, memory usage, or power usage

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions