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.

When map is tilted, annotation views don’t scale by distance from camera #5040

Closed

Description

@1ec5

When the map is tilted, an GL icon or point annotation grows as the camera moves toward it and shrinks as the camera moves away from it (#2186). However, annotation views maintain their size. This behavior is consistent with the user dot, but scaling would help by reinforcing the illusion of a tilted map.

/cc @boundsj @friedbunny

Activity

  1. added
    iOS
    on May 14, 2016
  2. friedbunny commented on May 14, 2016

    @friedbunny
    Contributor

    This will be a good option to have. MapKit maintains constant size, while Google scales by distance — neither gives you a choice.

  3. 1ec5 commented on May 14, 2016

    @1ec5
    ContributorAuthor

    I think the default should be to scale, for consistency with GL annotations.

  4. added
    annotations
    on May 16, 2016
  5. self-assigned this
    on May 19, 2016
  6. added this to the ios-v3.3.0 milestone on May 19, 2016
  7. boundsj commented on May 20, 2016

    @boundsj
    Contributor

    @1ec5 @friedbunny while #5085 offers a solution it is not one that can be shared with @tobrun. It also defaults to not scale by default -- for consistency with other SDKs and also because there is an ongoing discussion and it seems like things may eventually change in GL annotation land.

    Example of 1000 scaled, flattened annotation views:

    scaled_flat_annotations

  8. 1ec5 commented on May 20, 2016

    @1ec5
    ContributorAuthor

    It also defaults to not scale by default -- for consistency with other SDKs and also because there is an ongoing discussion and it seems like things may eventually change in GL annotation land.

    I’ve come around to the idea that unscaled annotations are more useful to more use cases than scaled annotations, despite scaling making for better demos. However, point annotations are still rendered by GL by default, and GL-rendered annotations are unconditionally scaled. I think it would be a jarring experience for you to adopt annotation views and suddenly see behaviors like scaling change.

  9. friedbunny commented on May 21, 2016

    @friedbunny
    Contributor

    I don’t think we should constrain view-based annotations based on the current (in)capabilities of GL annotations. The difference may be potentially jarring, but unscaled is the default we’re converging on for both, even if we don’t know when GL will support it.

    I wonder how common mix-and-match platform-view-and-GL annotations will be. If a developer uses both and thinks the scale difference is unsightly, they’re likely to seek out the MGLViewAnnotation.scaled option. I’m not sure that the opposite will be true — I’d be afraid developers won’t know the unscaled option exists.

  10. 1ec5 commented on May 21, 2016

    @1ec5
    ContributorAuthor

    What if we default to scaling for now but change the default for both types of annotations when GL annotations gain that capability too?

  11. boundsj commented on May 23, 2016

    @boundsj
    Contributor

    What if we default to scaling for now but change the default for both types of annotations when GL annotations gain that capability too?

    I've been thinking about it and while there does not seem to be a perfect solution here, I think that aiming for as much consistency as possible between GL and view annotations makes the most sense. So, I will rework #5085 to default to scaling and we can sync up again in the future when GL default behavior changes (as @1ec5 suggested). The downside of this is that is that the flip will fundamentally change how applications built on this strategy behave when they adopt some future version that does not scale by default. So, we will need to take care to document that change and respond to inevitable bug reports.

  12. jfirebaugh commented on May 23, 2016

    @jfirebaugh
    Contributor

    Given that the consensus in mapbox/mapbox-gl-js#2541 was that scaling by default was better, I suspect it will always be the style spec default.

  13. 1ec5 commented on May 23, 2016

    @1ec5
    ContributorAuthor

    Wouldn’t it be possible for mbgl::PointAnnotations (whose styling is ultimately determined by the SDK) to default to a different scaling behavior than GL circle features?

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

Metadata

Metadata

Assignees

Labels

annotationsbugiOS

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions