[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:
@@ -205,8 +205,8 @@ void OfflineDownload::activateDownload() {
|
||||
style::GeoJSONSource::Impl* geojsonSource =
|
||||
static_cast<style::GeoJSONSource::Impl*>(source->baseImpl.get());
|
||||
|
||||
if (!geojsonSource->loaded) {
|
||||
ensureResource(Resource::source(geojsonSource->getURL()));
|
||||
if (geojsonSource->getURL()) {
|
||||
ensureResource(Resource::source(*geojsonSource->getURL()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user