summaryrefslogtreecommitdiff
path: root/include/mbgl/style/conversion
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-08-15 18:34:45 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-08-16 11:04:30 +0200
commit18176605f65ce90c973e0b61a1a2b563471b0ba5 (patch)
tree4570f3dd8d213c96e4591c5d989d427120f16fb6 /include/mbgl/style/conversion
parentc34130ac6d968a3ff636af71e19893d22c2faa99 (diff)
downloadqtlocation-mapboxgl-18176605f65ce90c973e0b61a1a2b563471b0ba5.tar.gz
[core] support "scheme": "tms" in TileJSON files
Diffstat (limited to 'include/mbgl/style/conversion')
-rw-r--r--include/mbgl/style/conversion/tileset.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mbgl/style/conversion/tileset.hpp b/include/mbgl/style/conversion/tileset.hpp
index 46425597af..1955cc16cf 100644
--- a/include/mbgl/style/conversion/tileset.hpp
+++ b/include/mbgl/style/conversion/tileset.hpp
@@ -31,6 +31,14 @@ public:
result.tiles.push_back(std::move(*urlTemplate));
}
+ auto schemeValue = objectMember(value, "scheme");
+ if (schemeValue) {
+ optional<std::string> scheme = toString(*schemeValue);
+ if (scheme && *scheme == "tms") {
+ result.scheme = Tileset::Scheme::TMS;
+ }
+ }
+
auto minzoomValue = objectMember(value, "minzoom");
if (minzoomValue) {
optional<float> minzoom = toNumber(*minzoomValue);