summaryrefslogtreecommitdiff
path: root/src/mbgl/style/sources
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-06-14 10:56:51 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-14 11:25:45 -0700
commit9d3c4fbbb05d37802ebc15210b041392b4d48f15 (patch)
tree2f4638ebcff4cc50a08c73ed6587a53c7014bcf0 /src/mbgl/style/sources
parent9dfcb95e4fe333922306eadd4df5cbde2f03a6c1 (diff)
downloadqtlocation-mapboxgl-9d3c4fbbb05d37802ebc15210b041392b4d48f15.tar.gz
[core] Push Source::url down to subclasses
Diffstat (limited to 'src/mbgl/style/sources')
-rw-r--r--src/mbgl/style/sources/geojson_source.cpp3
-rw-r--r--src/mbgl/style/sources/geojson_source.hpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mbgl/style/sources/geojson_source.cpp b/src/mbgl/style/sources/geojson_source.cpp
index 6e1068dadb..7daf148291 100644
--- a/src/mbgl/style/sources/geojson_source.cpp
+++ b/src/mbgl/style/sources/geojson_source.cpp
@@ -63,7 +63,8 @@ std::unique_ptr<GeoJSONSource> GeoJSONSource::parse(const std::string& id,
GeoJSONSource::GeoJSONSource(std::string id_,
std::string url_,
std::unique_ptr<mapbox::geojsonvt::GeoJSONVT>&& geojsonvt_)
- : Source(SourceType::GeoJSON, std::move(id_), std::move(url_), util::tileSize),
+ : Source(SourceType::GeoJSON, std::move(id_), util::tileSize),
+ url(url_),
geojsonvt(std::move(geojsonvt_)) {
}
diff --git a/src/mbgl/style/sources/geojson_source.hpp b/src/mbgl/style/sources/geojson_source.hpp
index 7022d387e9..996dac3aca 100644
--- a/src/mbgl/style/sources/geojson_source.hpp
+++ b/src/mbgl/style/sources/geojson_source.hpp
@@ -28,10 +28,13 @@ public:
void load(FileSource&) final;
+ const std::string& getURL() const { return url; }
+
private:
Range<uint8_t> getZoomRange() final;
std::unique_ptr<Tile> createTile(const OverscaledTileID&, const UpdateParameters&) final;
+ const std::string url;
std::unique_ptr<mapbox::geojsonvt::GeoJSONVT> geojsonvt;
std::unique_ptr<AsyncRequest> req;
};