Skip to content
This repository has been 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
1ec5 opened this issue May 14, 2016 · 9 comments
Closed
Assignees
Labels
annotations Annotations on iOS and macOS or markers on Android bug iOS Mapbox Maps SDK for iOS
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented May 14, 2016

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

@friedbunny
Copy link
Contributor

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

@1ec5
Copy link
Contributor Author

1ec5 commented May 14, 2016

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

@boundsj boundsj added the annotations Annotations on iOS and macOS or markers on Android label May 16, 2016
@boundsj boundsj self-assigned this May 19, 2016
@boundsj boundsj added this to the ios-v3.3.0 milestone May 19, 2016
@boundsj
Copy link
Contributor

boundsj commented May 20, 2016

@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

@1ec5
Copy link
Contributor Author

1ec5 commented May 20, 2016

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.

@friedbunny
Copy link
Contributor

friedbunny commented May 21, 2016

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.

@1ec5
Copy link
Contributor Author

1ec5 commented May 21, 2016

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

@boundsj
Copy link
Contributor

boundsj commented May 23, 2016

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.

@jfirebaugh
Copy link
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.

@1ec5
Copy link
Contributor Author

1ec5 commented May 23, 2016

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
annotations Annotations on iOS and macOS or markers on Android bug iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

4 participants