diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-08-25 17:44:44 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-08-26 10:30:55 -0700 |
commit | d2abb1b6d5cc129acaadab15152ae286b989d9ba (patch) | |
tree | 05528dfb620931cda49b044c2d8fbbcc4da67232 /src/mbgl/style/sources/geojson_source_impl.hpp | |
parent | 50ae6c738a3ed1da14c73ce507071385bbc441b0 (diff) | |
download | qtlocation-mapboxgl-d2abb1b6d5cc129acaadab15152ae286b989d9ba.tar.gz |
[core] Change GeoJSONSource::getURL() to return an optional<std::string>
GeoJSON sources may have inline GeoJSON rather than a URL; returning an optional type ensures that consumers handle this case.
Diffstat (limited to 'src/mbgl/style/sources/geojson_source_impl.hpp')
-rw-r--r-- | src/mbgl/style/sources/geojson_source_impl.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/style/sources/geojson_source_impl.hpp b/src/mbgl/style/sources/geojson_source_impl.hpp index eb3563e85a..684b79b3fa 100644 --- a/src/mbgl/style/sources/geojson_source_impl.hpp +++ b/src/mbgl/style/sources/geojson_source_impl.hpp @@ -16,9 +16,9 @@ public: ~Impl() final; void setURL(std::string); - void setGeoJSON(const GeoJSON&); + optional<std::string> getURL(); - std::string getURL(); + void setGeoJSON(const GeoJSON&); void load(FileSource&) final; @@ -30,10 +30,10 @@ private: Range<uint8_t> getZoomRange() final; std::unique_ptr<Tile> createTile(const OverscaledTileID&, const UpdateParameters&) final; - variant<std::string, GeoJSONVTPointer, SuperclusterPointer> urlOrGeoJSON; - std::unique_ptr<AsyncRequest> req; - GeoJSONOptions options; + optional<std::string> url; + std::unique_ptr<AsyncRequest> req; + variant<GeoJSONVTPointer, SuperclusterPointer> geoJSONOrSupercluster; }; } // namespace style |