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

Fit Camera to Feature #6208

Closed
wants to merge 1 commit into from
Closed

Fit Camera to Feature #6208

wants to merge 1 commit into from

Conversation

asheemmamoowala
Copy link
Contributor

Closes #2245.

TODO

  • description
  • tests
  • documentation

@asheemmamoowala asheemmamoowala changed the title [WIP] Fit Feature Fit Camera to Feature Feb 23, 2018
@@ -342,6 +342,65 @@ class Camera extends Evented {
return this;
}

/**
* Pans and zooms the map to contain its visible area within the geographical bounds of the feature geometry.
* This function will also reset the map's bearing to 0 if bearing is nonzero.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean fit to feature is pitch aware and will retain the existing pitch?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function will also reset the map's bearing to 0 if bearing is nonzero.

What are the implications of this for backwards compatibility? In the future if we can support retaining the bearing as part of fitFeature would it just be a breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not alter the pitch, but it also doesn't account for it and will not give the correct result.
There is no resolution yet for the pitch aware fitting.

There is more work needed to maintain the bearing or change it to some other value as part of the fitting operation.

@mourner
Copy link
Member

mourner commented Mar 21, 2019

Closing as stale — feel free to reopen if there's still interest in shipping this.

@mourner mourner closed this Mar 21, 2019
@asheemmamoowala asheemmamoowala deleted the fit-feature branch January 8, 2020 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants