diff options
author | Marcus Lundblad <ml@dfupdate.se> | 2022-09-13 23:11:18 +0200 |
---|---|---|
committer | Marcus Lundblad <ml@dfupdate.se> | 2022-09-22 21:13:00 +0200 |
commit | 5e1a68a3bb0a62f2d31793e0c82c150238b0a719 (patch) | |
tree | fe39f558341bf9f69f714bd81b7764011ad5def5 | |
parent | 91250e91d6b49a65ada2ab8a9b405f4b9506b541 (diff) | |
download | gnome-maps-5e1a68a3bb0a62f2d31793e0c82c150238b0a719.tar.gz |
mapView: Fix initializing local tile data source
Remove reference to non-existing variable "renderer".
Use the correct zoom level properties from the file data source.
-rw-r--r-- | src/mapView.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mapView.js b/src/mapView.js index 1bc55289..14b11538 100644 --- a/src/mapView.js +++ b/src/mapView.js @@ -446,9 +446,7 @@ export class MapView extends Gtk.Overlay { Application.settings.set('map-type', mapType); } else { let source = new GnomeMaps.FileDataSource({ - path: Utils.getBufferText(Application.application.local_tile_path), - renderer: renderer, - tile_size: Application.application.local_tile_size || 512 + path: Utils.getBufferText(Application.application.local_tile_path) }); try { source.prepare(); @@ -456,8 +454,8 @@ export class MapView extends Gtk.Overlay { mapSource = new Shumate.RasterRenderer({ id: 'local', name: 'local', - min_zoom_level: source.min_zoom_level, - max_zoom_level: source.max_zoom_level, + min_zoom_level: source.min_zoom, + max_zoom_level: source.max_zoom, tile_size: Application.application.local_tile_size ?? 512, projection: Shumate.MapProjection.MERCATOR, data_source: source }); @@ -465,6 +463,7 @@ export class MapView extends Gtk.Overlay { this.setMapType(MapView.MapType.STREET); Application.application.local_tile_path = false; Utils.showDialog(e.message, Gtk.MessageType.ERROR, this._mainWindow); + return; } } |