diff options
author | Molly Lloyd <mollymerp@users.noreply.github.com> | 2018-01-23 10:49:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-23 10:49:23 -0800 |
commit | f3294200c6c866e5ab031ad8346c59a76aa37249 (patch) | |
tree | 6d9aedb552552607641a15c415a60be99a0877d5 /include/mbgl/style/sources | |
parent | 2d15aed43c9faa875a8f625c3afc286f1175e0ce (diff) | |
download | qtlocation-mapboxgl-f3294200c6c866e5ab031ad8346c59a76aa37249.tar.gz |
[core] add raster-dem source type and hillshade layer type (#10642)
Diffstat (limited to 'include/mbgl/style/sources')
-rw-r--r-- | include/mbgl/style/sources/raster_dem_source.hpp | 25 | ||||
-rw-r--r-- | include/mbgl/style/sources/raster_source.hpp | 4 |
2 files changed, 27 insertions, 2 deletions
diff --git a/include/mbgl/style/sources/raster_dem_source.hpp b/include/mbgl/style/sources/raster_dem_source.hpp new file mode 100644 index 0000000000..82588613bc --- /dev/null +++ b/include/mbgl/style/sources/raster_dem_source.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include <mbgl/style/sources/raster_source.hpp> +#include <mbgl/util/tileset.hpp> +#include <mbgl/util/variant.hpp> + +namespace mbgl { + +class AsyncRequest; + +namespace style { + +class RasterDEMSource : public RasterSource { +public: + RasterDEMSource(std::string id, variant<std::string, Tileset> urlOrTileset, uint16_t tileSize); + +}; + +template <> +inline bool Source::is<RasterDEMSource>() const { + return getType() == SourceType::RasterDEM; +} + +} // namespace style +} // namespace mbgl diff --git a/include/mbgl/style/sources/raster_source.hpp b/include/mbgl/style/sources/raster_source.hpp index 7f23a7ca4b..5aa81aa979 100644 --- a/include/mbgl/style/sources/raster_source.hpp +++ b/include/mbgl/style/sources/raster_source.hpp @@ -12,8 +12,8 @@ namespace style { class RasterSource : public Source { public: - RasterSource(std::string id, variant<std::string, Tileset> urlOrTileset, uint16_t tileSize); - ~RasterSource() final; + RasterSource(std::string id, variant<std::string, Tileset> urlOrTileset, uint16_t tileSize, SourceType sourceType = SourceType::Raster); + ~RasterSource() override; const variant<std::string, Tileset>& getURLOrTileset() const; optional<std::string> getURL() const; |