diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-23 12:00:25 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-24 09:39:51 -0700 |
commit | 021d4199cb9ee754e9f0f5bc42f7f75285afd405 (patch) | |
tree | 9396f291348c0ab5f3a75e1a217a78fc4dbff4b2 /include/mbgl/style/sources | |
parent | 16c435b1517b15a5ea8654987979ef58800b838b (diff) | |
download | qtlocation-mapboxgl-021d4199cb9ee754e9f0f5bc42f7f75285afd405.tar.gz |
[core, node] Implement bindings for addSource
Diffstat (limited to 'include/mbgl/style/sources')
-rw-r--r-- | include/mbgl/style/sources/geojson_source.hpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/include/mbgl/style/sources/geojson_source.hpp b/include/mbgl/style/sources/geojson_source.hpp index 96b9a99606..3736dd44bc 100644 --- a/include/mbgl/style/sources/geojson_source.hpp +++ b/include/mbgl/style/sources/geojson_source.hpp @@ -1,26 +1,22 @@ #pragma once #include <mbgl/style/source.hpp> +#include <mbgl/util/geojson.hpp> namespace mbgl { namespace style { class GeoJSONSource : public Source { public: - // Future public API: - // void setData(FeatureCollection&&); - // void setJSON(const std::string& json); - // void loadData(const std::string& url); + GeoJSONSource(const std::string& id); + void setURL(const std::string& url); + void setGeoJSON(GeoJSON&&); // Private implementation class Impl; - - template <class Fn> - GeoJSONSource(Fn&& fn) - : Source(SourceType::GeoJSON, fn(*this)) { - } + Impl* const impl; }; } // namespace style |