summaryrefslogtreecommitdiff
path: root/src/mbgl/style/conversion/tileset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/conversion/tileset.cpp')
-rw-r--r--src/mbgl/style/conversion/tileset.cpp2
1 files changed, 2 insertions, 0 deletions
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<Tileset> Converter<Tileset>::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 });
}