From a57be420b0a90760d505d8e1df3e0d42ac1aa10d Mon Sep 17 00:00:00 2001 From: Asheem Mamoowala Date: Thu, 8 Mar 2018 12:35:33 -0800 Subject: [core] TileJSON conversion clamps bounds longitude to [-180,180], per spec --- src/mbgl/style/conversion/tileset.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mbgl/style') diff --git a/src/mbgl/style/conversion/tileset.cpp b/src/mbgl/style/conversion/tileset.cpp index 6d89cef944..a2c4aa80b3 100644 --- a/src/mbgl/style/conversion/tileset.cpp +++ b/src/mbgl/style/conversion/tileset.cpp @@ -103,6 +103,8 @@ optional Converter::operator()(const Convertible& value, Error 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 }); } -- cgit v1.2.1