summaryrefslogtreecommitdiff
path: root/src/mbgl/style/sources/geojson_source_impl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/sources/geojson_source_impl.hpp')
-rw-r--r--src/mbgl/style/sources/geojson_source_impl.hpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/mbgl/style/sources/geojson_source_impl.hpp b/src/mbgl/style/sources/geojson_source_impl.hpp
index b827a0b26c..e8b881d05e 100644
--- a/src/mbgl/style/sources/geojson_source_impl.hpp
+++ b/src/mbgl/style/sources/geojson_source_impl.hpp
@@ -3,14 +3,19 @@
#include <mbgl/style/source_impl.hpp>
#include <mbgl/style/sources/geojson_source.hpp>
#include <mbgl/util/variant.hpp>
-#include <mbgl/tile/geojson_tile.hpp>
namespace mbgl {
class AsyncRequest;
+class CanonicalTileID;
namespace style {
+class GeoJSONData {
+public:
+ virtual mapbox::geometry::feature_collection<int16_t> getTile(const CanonicalTileID&) = 0;
+};
+
class GeoJSONSource::Impl : public Source::Impl {
public:
Impl(std::string id, Source&, const GeoJSONOptions);
@@ -18,27 +23,21 @@ public:
void setURL(std::string);
optional<std::string> getURL() const;
+ Range<uint8_t> getZoomRange() const;
void setGeoJSON(const GeoJSON&);
- void setTileData(GeoJSONTile&, const OverscaledTileID& tileID);
+ GeoJSONData* getData() const;
void loadDescription(FileSource&) final;
-
- uint16_t getTileSize() const final {
- return util::tileSize;
- }
-
- optional<Range<uint8_t>> getZoomRange() const final;
+ std::unique_ptr<RenderSource> createRenderSource() const final;
private:
void _setGeoJSON(const GeoJSON&);
- std::unique_ptr<Tile> createTile(const OverscaledTileID&, const UpdateParameters&) final;
-
GeoJSONOptions options;
optional<std::string> url;
std::unique_ptr<AsyncRequest> req;
- variant<GeoJSONVTPointer, SuperclusterPointer> geoJSONOrSupercluster;
+ std::unique_ptr<GeoJSONData> data;
};
} // namespace style