Cherry pick #11176 for Agua patch
This commit is contained in:
committed by
Asheem Mamoowala
parent
cdaf90d2e7
commit
560afaf1fb
@@ -12,7 +12,7 @@ struct Converter<Tileset> {
|
||||
public:
|
||||
|
||||
bool validateLatitude(const double lat) const {
|
||||
return lat < 90 && lat > -90;
|
||||
return lat <= 90 && lat >= -90;
|
||||
}
|
||||
|
||||
template <class V>
|
||||
|
||||
@@ -52,6 +52,16 @@ TEST(Tileset, InvalidBounds) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Tileset, ValidWorldBounds) {
|
||||
Error error;
|
||||
mbgl::optional<Tileset> converted = convertJSON<Tileset>(R"JSON({
|
||||
"tiles": ["http://mytiles"],
|
||||
"bounds": [-180, -90, 180, 90]
|
||||
})JSON", error);
|
||||
EXPECT_TRUE((bool) converted);
|
||||
EXPECT_EQ(converted->bounds, LatLngBounds::hull({90, -180}, {-90, 180}));
|
||||
}
|
||||
|
||||
TEST(Tileset, FullConversion) {
|
||||
Error error;
|
||||
Tileset converted = *convertJSON<Tileset>(R"JSON({
|
||||
|
||||
Reference in New Issue
Block a user