diff options
Diffstat (limited to 'src/mbgl/style/tile_source.cpp')
-rw-r--r-- | src/mbgl/style/tile_source.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/mbgl/style/tile_source.cpp b/src/mbgl/style/tile_source.cpp index 022693f499..0824693331 100644 --- a/src/mbgl/style/tile_source.cpp +++ b/src/mbgl/style/tile_source.cpp @@ -68,27 +68,6 @@ void parseTileJSONMember(const JSValue& value, uint8_t& target, const char* name target = uint; } -void parseTileJSONMember(const JSValue& value, std::array<double, 4>& target, const char* name) { - if (!value.HasMember(name)) { - return; - } - - const JSValue& property = value[name]; - if (!property.IsArray() || property.Size() > 4) { - return; - } - - for (rapidjson::SizeType i = 0; i < property.Size(); i++) { - if (!property[i].IsNumber()) { - return; - } - } - - for (rapidjson::SizeType i = 0; i < property.Size(); i++) { - target[i] = property[i].GetDouble(); - } -} - Tileset parseTileJSON(const JSValue& value) { Tileset result; @@ -97,13 +76,6 @@ Tileset parseTileJSON(const JSValue& value) { parseTileJSONMember(value, result.zoomRange.max, "maxzoom"); parseTileJSONMember(value, result.attribution, "attribution"); - std::array<double, 4> array; - parseTileJSONMember(value, array, "center"); - result.center = { array[0], array[1] }; - result.zoom = array[2]; - parseTileJSONMember(value, array, "bounds"); - result.bounds = LatLngBounds::hull({ array[0], array[1] }, { array[2], array[3] }); - return result; } |