Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate camera/transform state with style state #3654

Closed
anandthakker opened this issue Nov 17, 2016 · 1 comment
Closed

Consolidate camera/transform state with style state #3654

anandthakker opened this issue Nov 17, 2016 · 1 comment

Comments

@anandthakker
Copy link
Contributor

As a followup to smart setStyle, move the camera state management into Style (perhaps renamed to StyleState a la #3650), so that camera state can be included as a top-level property to Map#setStyle (and Style#setState).

  • Accept camera/transform state as top-level setState property (includes zoom, center, pitch, bearing, minzoom, maxzoom, lngRange, latRange)
  • Move transform-mutating stuff from Camera to Style
  • Refactor Camera methods to use Style#setState
    • tricky thing here is transitions; can Camera's multi-frame easing code be reworked to use setState efficiently?

I think the second and third steps here may become much simpler after #3583

@jfirebaugh
Copy link
Contributor

I think we should keep Style and Camera as separate state. Typically one does not want the camera to change when changing the style. In the uncommon case where you do, you can simply make two method calls.

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

No branches or pull requests

2 participants