summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2018-03-08 12:18:59 -0800
committerAsheem Mamoowala <asheem.mamoowala@mapbox.com>2018-03-08 13:49:56 -0800
commit7df451def6c37bd842b13954b91fe8f303ecec9f (patch)
tree89db9e30094b1862faae348be4196c27f5948800 /include
parentc54035afb159826740ebb4c6a69dfe0f1809604f (diff)
downloadqtlocation-mapboxgl-7df451def6c37bd842b13954b91fe8f303ecec9f.tar.gz
[core] TileJSON conversion clamps bounds longitude to [-180,180], per spec
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/style/conversion/tileset.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mbgl/style/conversion/tileset.hpp b/include/mbgl/style/conversion/tileset.hpp
index 6ec46aa7b6..16322b58ee 100644
--- a/include/mbgl/style/conversion/tileset.hpp
+++ b/include/mbgl/style/conversion/tileset.hpp
@@ -100,6 +100,8 @@ public:
error = { "bounds left longitude should be less than right longitude" };
return {};
}
+ *left = util::max(-180.0, *left);
+ *right = util::min(180.0, *right);
result.bounds = LatLngBounds::hull({ *bottom, *left }, { *top, *right });
}