[core] Trigger repaint on source changes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include <mbgl/style/sources/geojson_source.hpp>
|
||||
#include <mbgl/style/sources/geojson_source_impl.hpp>
|
||||
#include <mbgl/style/source_observer.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace style {
|
||||
@@ -16,6 +17,7 @@ void GeoJSONSource::setURL(const std::string& url) {
|
||||
|
||||
void GeoJSONSource::setGeoJSON(const mapbox::geojson::geojson& geoJSON) {
|
||||
impl->setGeoJSON(geoJSON);
|
||||
impl->observer->onSourceChanged(*this);
|
||||
}
|
||||
|
||||
optional<std::string> GeoJSONSource::getURL() const {
|
||||
|
||||
@@ -725,6 +725,7 @@ void Style::onSourceLoaded(Source& source) {
|
||||
|
||||
void Style::onSourceChanged(Source& source) {
|
||||
observer->onSourceChanged(source);
|
||||
observer->onUpdate(Update::Repaint);
|
||||
}
|
||||
|
||||
void Style::onSourceError(Source& source, std::exception_ptr error) {
|
||||
|
||||
Reference in New Issue
Block a user