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

revisit rotation limits #458

Closed
jfirebaugh opened this issue Sep 3, 2014 · 12 comments
Closed

revisit rotation limits #458

jfirebaugh opened this issue Sep 3, 2014 · 12 comments
Labels

Comments

@jfirebaugh
Copy link
Contributor

gl-native currently disallows rotation at z<3. This prevents several use cases that it should support:

  • Showing interactive rotated low zoom maps, even with world edges, if so desired.
  • Showing a non-interactive 90° or 180° ("South Up") map at low zoom level.
  • Headless rendering of low zoom level rotated static maps.

This is also currently causing headless test failures on fill-translate-anchor tests, which apply 90° rotation at z0.

I think we should remove the current rotation limits in Transform and replace them with something that applies constraints at a higher level, is off in headless contexts, can be opt-out in interactive contexts, and shares behavior with gl-js.

@incanus
Copy link
Contributor

incanus commented Sep 3, 2014

Related back issues: #242 #279

Totally up for adding switches for this, but mobile use cases are going to want it as-is, plus the eventual addition of animations per #296.

@ljbade
Copy link
Contributor

ljbade commented Nov 18, 2014

I would like to have the option to rotate when zoomed out purely because Google Maps can and we want to be better than Google Maps.

@incanus
Copy link
Contributor

incanus commented Nov 18, 2014

screenshot_2014-11-18-12-35-31 copy

I guess it's minor though.

@ljbade
Copy link
Contributor

ljbade commented Nov 19, 2014

Just fill northern part with sea colour, and southern part with ice colour. Might not work with certain styles or satellite imagery.

The main problem with locking rotation is that there is no feedback, e.g. 'bounce' when trying to drag past the end of a scroll box. Thus the user thinks they can't rotate the map at all, or something is wrong e.g. we are not reading their rotate gesture.

@ljbade
Copy link
Contributor

ljbade commented Nov 19, 2014

@incanus Another argument for no rotation - we should not force a user into a particular direction as being 'up'.

Some Australians like to think that we are at the top of the world and that all maps should look like this:
image
Why should we deny them their preference?

@ljbade
Copy link
Contributor

ljbade commented Nov 19, 2014

Two more againsts - it causes bugs/confusion, see:

@incanus
Copy link
Contributor

incanus commented Nov 19, 2014

Let's try to keep discussions about limitations to rotation (whether zoom or antimeridian) in this ticket. Closing #618.

I absolutely take your point about Australian preference @ljbade. But check out how Apple Maps handles this:

anigif-1416418524

(Smooth video version here)

The animation style is more of a hint than anything, and the antimeridian issue is actually really a zoom issue. If you zoom way in on the Southern Pacific, then rotate, then pan across the ocean, rotation is allowed. It's only at lower-numbered zooms that this rotates back to north.

We could always add a preference for this, but I'm thinking that based on the kinds of visualizations that are likely to be used by these tools, especially on mobile, restricting rotation to higher-numbered zooms is ok. And I really like the elegance of the user cue in Apple's style of animation.

@ljbade
Copy link
Contributor

ljbade commented Nov 19, 2014

Hmm, I think we should make this a option you can turn on and off.

Apple's animation style does help to show what is happening to the user.

But the antimeridian lock is just dumb because there is no reason for it, the map wraps around so there is no edge to the map there and it is really annoying in New Zealand.

@ljbade
Copy link
Contributor

ljbade commented Nov 19, 2014

Or at least add a dashed line to the mbgl maps along the antimeridian to show there is a map seam there.

@jfirebaugh
Copy link
Contributor Author

FWIW, Google Maps does not have any rotation constraining behavior. Seems like we have consensus that this doesn't work well as a low-level feature -- it should be an option in the cocoa bindings though. Ticketed as cutting-room-floor/mapbox-gl-cocoa#66.

@jfirebaugh jfirebaugh reopened this Nov 20, 2014
jfirebaugh added a commit to cutting-room-floor/mapbox-gl-cocoa that referenced this issue Nov 20, 2014
@ljbade
Copy link
Contributor

ljbade commented Nov 21, 2014

@jfirebaugh rotate still does not work when zoomed out, it seems to be related to having the north/south or antimeridian in the map.

Can you remove this restriction as well? and just let black/grey fill colour show in the corners like in the Google Maps screenshot above.

@ljbade ljbade reopened this Nov 21, 2014
@jfirebaugh
Copy link
Contributor Author

@ljbade With osxapp I can reproduce #463 but not rotation generally not working. If there's some other issue let's ticket it separately.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants