summaryrefslogtreecommitdiff
path: root/include/mbgl/util/tileset.hpp
diff options
context:
space:
mode:
authorMolly Lloyd <mollymerp@users.noreply.github.com>2018-02-14 13:17:55 -0800
committerGitHub <noreply@github.com>2018-02-14 13:17:55 -0800
commit8a283b030629abb00367929d047731c3974bc3d6 (patch)
tree4016b561a3ab52e4ce12e65b4307f0b626124120 /include/mbgl/util/tileset.hpp
parenta386cac452b333d3e9656efd04e98035cd6b1c57 (diff)
downloadqtlocation-mapboxgl-8a283b030629abb00367929d047731c3974bc3d6.tar.gz
[core] add support for mapzen terrarium (#11154)
* add support for mapzen terrarium * Encoding --> DEMEncoding, avoid if statement when unpacking elevation values * add Terrarium test * update submodule * remove redundant checks
Diffstat (limited to 'include/mbgl/util/tileset.hpp')
-rw-r--r--include/mbgl/util/tileset.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/mbgl/util/tileset.hpp b/include/mbgl/util/tileset.hpp
index 1b7b8f0f75..ed2b907647 100644
--- a/include/mbgl/util/tileset.hpp
+++ b/include/mbgl/util/tileset.hpp
@@ -14,22 +14,28 @@ namespace mbgl {
class Tileset {
public:
enum class Scheme : bool { XYZ, TMS };
+ enum class DEMEncoding : bool { Mapbox, Terrarium };
std::vector<std::string> tiles;
Range<uint8_t> zoomRange;
std::string attribution;
Scheme scheme;
+ // DEMEncoding is not supported by the TileJSON spec
+ DEMEncoding encoding;
optional<LatLngBounds> bounds;
+
Tileset(std::vector<std::string> tiles_ = std::vector<std::string>(),
Range<uint8_t> zoomRange_ = { 0, util::DEFAULT_MAX_ZOOM },
std::string attribution_ = {},
- Scheme scheme_ = Scheme::XYZ)
+ Scheme scheme_ = Scheme::XYZ,
+ DEMEncoding encoding_ = DEMEncoding::Mapbox)
: tiles(std::move(tiles_)),
zoomRange(std::move(zoomRange_)),
attribution(std::move(attribution_)),
scheme(scheme_),
- bounds() {}
+ encoding(encoding_),
+ bounds() {};
// TileJSON also includes center and zoom but they are not used by mbgl.