Skip to content

Fit Camera to Feature - #6208

Closed
asheemmamoowala wants to merge 1 commit into
masterfrom
fit-feature
Closed

asheemmamoowala wants to merge 1 commit into
masterfrom
fit-feature

Conversation

@asheemmamoowala

Copy link
Copy Markdown
Contributor

Closes #2245.

TODO

  • description
  • tests
  • documentation

@asheemmamoowala asheemmamoowala changed the title [WIP] Fit Feature Fit Camera to Feature Feb 23, 2018
Comment thread src/ui/camera.js

/**
* 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@asheemmamoowala asheemmamoowala mentioned this pull request Jul 19, 2018
4 of 5 tasks
@mourner

mourner commented Mar 21, 2019

Copy link
Copy Markdown
Member

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