summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@update.uu.se>2020-06-25 23:02:07 +0200
committerMarcus Lundblad <ml@update.uu.se>2020-06-27 23:15:13 +0200
commit8afea96725c0e0a102e08bc05248f4a1c594f6e7 (patch)
tree55c8e5a54d638e97961db08ed6877da6e1b0f7f9
parent5c53a8fff7c9e5e6e0615757acd01f159fb6b1ca (diff)
downloadgnome-maps-wip/mlundblad/refresh-shapelayers.tar.gz
mapView: Refresh shape layers when switching night mode and hybrid aerialwip/mlundblad/refresh-shapelayers
-rw-r--r--src/mapView.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mapView.js b/src/mapView.js
index 77f26f18..d14b678a 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -258,19 +258,25 @@ var MapView = GObject.registerClass({
_onNightModeChanged() {
if (this._mapType === MapType.STREET) {
+ let overlay_sources = this.view.get_overlay_sources();
+
if (Application.settings.get('night-mode'))
this.view.map_source = MapSource.createStreetDarkSource();
else
this.view.map_source = MapSource.createStreetSource();
+ overlay_sources.forEach((source) => this.view.add_overlay_source(source, 255));
}
}
_onHybridAerialChanged() {
if (this._mapType === MapType.AERIAL) {
+ let overlay_sources = this.view.get_overlay_sources();
+
if (Application.settings.get('hybrid-aerial'))
this.view.map_source = MapSource.createHybridAerialSource();
else
this.view.map_source = MapSource.createAerialSource();
+ overlay_sources.forEach((source) => this.view.add_overlay_source(source, 255));
}
}