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.

popups #894

Closed
Closed

Description

@incanus

Popups, callouts, bubbles, whatever you want to call them, we need selection state and info bubbles on markers.

Per @jfirebaugh (and I agree) we should do these for each platform because they are distinct and need to feel natural to the platform, such as being complex, even animated, views and being able to contain other platform-specific views.

For this reason, I think we should only worry about this on Android and iOS.

I've been very happy with SMCalloutView, which we integrated into our iOS SDK, and I think we should continue to use that here.

Activity

  1. added
    iOS
    Android
    on Feb 17, 2015
  2. added this to the milestone on Feb 17, 2015
  3. incanus commented on Feb 17, 2015

    @incanus
    ContributorAuthor

    Also of note is that the performance implications of not doing this in GL core itself will be small. At least on iOS, only one callout is present at a time (single selection) and just simply tracks on the map.

  4. ljbade commented on Feb 18, 2015

    @ljbade
    Contributor

    On Android the OS uses GL anyway to render/draw overlaid views so unlikely to be slower then rendering in our GL context.

  5. incanus commented on Feb 20, 2015

    @incanus
    ContributorAuthor

    @1ec5 has been starting to look into this, tracking using CADisplayLink but going to try @bleege's work on a "region is actively changing" delegate method in iOS.

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

    @incanus
    ContributorAuthor

    I'm grabbing this now to start on post-point annotations merge (#1021) since gestures, point-in-bounds, and platform-side callouts are all integrated.

  8. assigned and unassigned on Mar 18, 2015
  9. incanus commented on Mar 18, 2015

    @incanus
    ContributorAuthor

    Annotation selection should work something like this. Note that unlike MapKit, the z-index of the selected marker doesn't change (that's in #991).

    anigif-1426651756

    This is done with something like d53fb94, which just does a dumb 44px box around the touch for point-in-bounds querying, then iterates selection state through the close-by annotations. It doesn't take marker icon size into account; likely we'll want to make this box a bit larger and emphasize in the top direction.

    This is kind of like JS's featuresAt(), since point annotations' tiles work like an R-Tree.

  10. incanus commented on Mar 19, 2015

    @incanus
    ContributorAuthor

    Summarizing state of popups. The tough nut to crack here is syncing pan and zoom — including decelerated coasting — between native iOS views and the GL view. We've tried this in three branches, with varying combos of MGLAnnotation protocol data objects or other placeholder markers.

    • 877-display-link — using CADisplayLink callback to sync simple UIImageView markers with GL
    • 877-callout — bringing in SMCalloutView popups & updating position of it and UIImageView markers using a new mbgl::MapChangeRegionIsChanging event coming out of GL
    • 877-point-callout — same as above, but originally merging in GL-side point annotation work (@1ec5 I think we can fold this into the above branch now?)

    All have been updated to master as of ae7bd9a.

    The next approach I'm going to try is, since we're tracking annotations' positions GL-side, have GL update their screen position values every frame draw, and have Cocoa read out those values, translate to CGPoint, and update on screen. That is, the main difference between all of the above approaches is that we'd have GL update the non-geographic positions itself on frame draw rather than the non-GL parts update them on some sort of (likely delayed and/or not as frequent) callback.

  11. 1ec5 commented on Mar 19, 2015

    @1ec5
    Contributor

    @incanus Yes, let’s fold 877-point-callout into 877-callout. That’ll make merging for 756-gps-marker easier.

  12. 111 remaining items

  13. added 15 commits that reference this issue on Nov 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Androidfeature

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions