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

[agua] Clamp TileJSON bounds #11425

Merged
merged 2 commits into from
Mar 8, 2018
Merged

Conversation

asheemmamoowala
Copy link
Contributor

Fixes #11411.

Also cherry-picked #11227, to address #11213 and #11209 for agua.

In mapbox-gl-js, TileJSON bounds longitudes are clamped to [-180,180]. Existing styles benefitted from this clamping when their bounds were outside this range.
(For example [-179.9999893871037, -89.99993255000595, 180.00000000000006, 90])

In mapbox-gl-native, these longitude values are wrapped to:[179.9999893871037, -179.99999999999994]), resulting in bounds with a skinny horizontal extent.

Changed the TileJSON conversion to clamp the bounds, to provide results consistent with mapbox-gl-js.

@asheemmamoowala asheemmamoowala added the Core The cross-platform C++ core, aka mbgl label Mar 8, 2018
@asheemmamoowala asheemmamoowala added this to the ios-v3.7.6 milestone Mar 8, 2018
@asheemmamoowala asheemmamoowala changed the title Agua clamp tilejson bounds [agua] Clamp TileJSON bounds Mar 8, 2018
Copy link
Contributor

@captainbarbosa captainbarbosa left a comment

Choose a reason for hiding this comment

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

👍 confirmed this fixes the issue I was seeing in #11411, but we should probably get someone else more familiar with the core mbgl code to officially approve 😄

Copy link
Contributor

@friedbunny friedbunny left a comment

Choose a reason for hiding this comment

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

Being that the new changes here are simple, I’ll 💚.

This looks like it deserves two or three changelog entires for ios-v3.7.6 — if you can think of something good to put down please feel free, otherwise we’ll do it during the release process.

@asheemmamoowala asheemmamoowala merged commit 7df451d into release-agua Mar 8, 2018
@asheemmamoowala asheemmamoowala deleted the agua-clamp-tilejson-bounds branch March 8, 2018 21:50
@tobrun tobrun mentioned this pull request Mar 26, 2018
22 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants