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

Fit to coordinates #1795

Merged
merged 1 commit into from
Jun 27, 2015
Merged

Fit to coordinates #1795

merged 1 commit into from
Jun 27, 2015

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Jun 26, 2015

Whoever determined the boundaries of the District of Columbia did not have #1783 in mind. This PR generalizes the fit to bounds functionality added in #1783 so that shapes other than unrotated rectangles still fit well when the map view is rotated. Here’s iosapp without this PR, fitted to the District with just enough padding for the top bar:

district before

and with this PR:

district after

Here’s a decidedly non-rectangular trace (Add Test Shapes in the gear menu) without this PR:

orcas before

and with:

orcas after

This functionality belongs in mbgl::Map, as opposed to client code, because much larger shapes may be distorted by the projection; apps linked against Mapbox GL don’t have enough information to reliably account for that distortion.

/cc @incanus @friedbunny @kelvinabrokwa

@1ec5 1ec5 added feature iOS Mapbox Maps SDK for iOS labels Jun 26, 2015
@1ec5 1ec5 self-assigned this Jun 26, 2015
@1ec5 1ec5 added this to the iOS Beta 3 milestone Jun 26, 2015
Whoever determined the boundaries of the District of Columbia did not have fit-to-bounds implementations in mind. With this change, shapes that are not unrotated rectangles fit much, much better.
@1ec5 1ec5 merged commit ac2ad99 into master Jun 27, 2015
@1ec5 1ec5 removed the in progress label Jun 27, 2015
@1ec5 1ec5 deleted the 1ec5-district=crazytown branch June 27, 2015 04:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant