[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.
This commit is contained in:
John Firebaugh
2016-08-25 17:44:44 -07:00
parent 50ae6c738a
commit d2abb1b6d5
5 changed files with 22 additions and 23 deletions

View File

@@ -2,6 +2,7 @@
#include <mbgl/style/source.hpp>
#include <mbgl/util/geojson.hpp>
#include <mbgl/util/optional.hpp>
#include <mapbox/geojson.hpp>
@@ -42,7 +43,7 @@ public:
void setURL(const std::string& url);
void setGeoJSON(const GeoJSON&);
std::string getURL();
optional<std::string> getURL();
// Private implementation