summaryrefslogtreecommitdiff
path: root/src/mbgl/style/sources/geojson_source.hpp
blob: 670eb26964be4159c51802c04a20d38c033975cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once

#include <mbgl/style/source.hpp>

namespace mapbox {
namespace geojsonvt {
class GeoJSONVT;
} // namespace geojsonvt
} // namespace mapbox

namespace mbgl {
namespace style {

class GeoJSONSource : public Source {
public:
    GeoJSONSource(std::string id,
                  std::string url,
                  uint16_t tileSize,
                  std::unique_ptr<Tileset>&&,
                  std::unique_ptr<mapbox::geojsonvt::GeoJSONVT>&&);

    void load(FileSource&) final;

private:
    std::unique_ptr<Tile> createTile(const OverscaledTileID&, const UpdateParameters&) final;

    std::unique_ptr<mapbox::geojsonvt::GeoJSONVT> geojsonvt;
};

} // namespace style
} // namespace mbgl