1#pragma once
2
3#include <mbgl/style/source.hpp>
4#include <mbgl/util/tileset.hpp>
5#include <mbgl/util/variant.hpp>
6
7namespace mbgl {
8
9class AsyncRequest;
10
11namespace style {
12
13class RasterSource : public Source {
14public:
15 RasterSource(std::string id, variant<std::string, Tileset> urlOrTileset, uint16_t tileSize, SourceType sourceType = SourceType::Raster);
16 ~RasterSource() override;
17
18 const variant<std::string, Tileset>& getURLOrTileset() const;
19 optional<std::string> getURL() const;
20
21 uint16_t getTileSize() const;
22
23 class Impl;
24 const Impl& impl() const;
25
26 void loadDescription(FileSource&) final;
27
28private:
29 const variant<std::string, Tileset> urlOrTileset;
30 std::unique_ptr<AsyncRequest> req;
31};
32
33template <>
34inline bool Source::is<RasterSource>() const {
35 return getType() == SourceType::Raster;
36}
37
38} // namespace style
39} // namespace mbgl
40

source code of qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/style/sources/raster_source.hpp