diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-06-14 15:44:42 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-06-19 09:50:08 -0700 |
commit | a33cad98557f2d15bfb578e4795b130d25a2def2 (patch) | |
tree | 051ee0078e7edc2ed7d465e052b85cca7093d6a6 /src/mbgl/style/sources | |
parent | ca45974ff2778a48d01b7221b6ab406c3e55c9ca (diff) | |
download | qtlocation-mapboxgl-a33cad98557f2d15bfb578e4795b130d25a2def2.tar.gz |
[core] Trigger repaint on source changes
Diffstat (limited to 'src/mbgl/style/sources')
-rw-r--r-- | src/mbgl/style/sources/geojson_source.cpp | 1 | ||||
-rw-r--r-- | src/mbgl/style/sources/image_source.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mbgl/style/sources/geojson_source.cpp b/src/mbgl/style/sources/geojson_source.cpp index d04c8ffce4..4e3478322d 100644 --- a/src/mbgl/style/sources/geojson_source.cpp +++ b/src/mbgl/style/sources/geojson_source.cpp @@ -33,6 +33,7 @@ void GeoJSONSource::setURL(const std::string& url_) { void GeoJSONSource::setGeoJSON(const mapbox::geojson::geojson& geoJSON) { req.reset(); baseImpl = makeMutable<Impl>(impl(), geoJSON); + observer->onSourceChanged(*this); } optional<std::string> GeoJSONSource::getURL() const { diff --git a/src/mbgl/style/sources/image_source.cpp b/src/mbgl/style/sources/image_source.cpp index 757773d218..9313d8da4a 100644 --- a/src/mbgl/style/sources/image_source.cpp +++ b/src/mbgl/style/sources/image_source.cpp @@ -20,7 +20,7 @@ const ImageSource::Impl& ImageSource::impl() const { void ImageSource::setCoordinates(const std::array<LatLng, 4>& coords_) { baseImpl = makeMutable<Impl>(impl(), coords_); - observer->onSourceLoaded(*this); + observer->onSourceChanged(*this); } std::array<LatLng, 4> ImageSource::getCoordinates() const { @@ -44,7 +44,7 @@ void ImageSource::setImage(UnassociatedImage&& image_) { } loaded = true; baseImpl = makeMutable<Impl>(impl(), std::move(image_)); - observer->onSourceLoaded(*this); + observer->onSourceChanged(*this); } optional<std::string> ImageSource::getURL() const { |