[core] Push Source::geojsonvt down to GeoJSONSource
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
#include <unordered_map>
|
||||
#include <forward_list>
|
||||
|
||||
namespace mapbox {
|
||||
namespace geojsonvt {
|
||||
class GeoJSONVT;
|
||||
} // namespace geojsonvt
|
||||
} // namespace mapbox
|
||||
|
||||
namespace mbgl {
|
||||
namespace style {
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
#include <mbgl/algorithm/update_renderables.hpp>
|
||||
|
||||
#include <mapbox/geojsonvt.hpp>
|
||||
#include <mapbox/geojsonvt/convert.hpp>
|
||||
#include <mapbox/geometry/envelope.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -16,12 +16,6 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace mapbox {
|
||||
namespace geojsonvt {
|
||||
class GeoJSONVT;
|
||||
} // namespace geojsonvt
|
||||
} // namespace mapbox
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
class Painter;
|
||||
@@ -99,7 +93,6 @@ protected:
|
||||
void invalidateTiles();
|
||||
|
||||
std::unique_ptr<const Tileset> tileset;
|
||||
std::unique_ptr<mapbox::geojsonvt::GeoJSONVT> geojsonvt;
|
||||
std::unique_ptr<AsyncRequest> req;
|
||||
|
||||
SourceObserver* observer = nullptr;
|
||||
|
||||
@@ -18,8 +18,8 @@ GeoJSONSource::GeoJSONSource(std::string id_,
|
||||
uint16_t tileSize_,
|
||||
std::unique_ptr<Tileset>&& tileset_,
|
||||
std::unique_ptr<mapbox::geojsonvt::GeoJSONVT>&& geojsonvt_)
|
||||
: Source(SourceType::GeoJSON, std::move(id_), std::move(url_), tileSize_, std::move(tileset_)) {
|
||||
geojsonvt = std::move(geojsonvt_);
|
||||
: Source(SourceType::GeoJSON, std::move(id_), std::move(url_), tileSize_, std::move(tileset_)),
|
||||
geojsonvt(std::move(geojsonvt_)) {
|
||||
}
|
||||
|
||||
void GeoJSONSource::load(FileSource& fileSource) {
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
#include <mbgl/style/source.hpp>
|
||||
|
||||
namespace mapbox {
|
||||
namespace geojsonvt {
|
||||
class GeoJSONVT;
|
||||
} // namespace geojsonvt
|
||||
} // namespace mapbox
|
||||
|
||||
namespace mbgl {
|
||||
namespace style {
|
||||
|
||||
@@ -17,6 +23,8 @@ public:
|
||||
|
||||
private:
|
||||
std::unique_ptr<Tile> createTile(const OverscaledTileID&, const UpdateParameters&) final;
|
||||
|
||||
std::unique_ptr<mapbox::geojsonvt::GeoJSONVT> geojsonvt;
|
||||
};
|
||||
|
||||
} // namespace style
|
||||
|
||||
Reference in New Issue
Block a user