[gnome-maps/wip/mlundblad/location-bias-scale: 6/6] placeEntry: Always include location paramaters




commit af00040c94db6ee13267463bceadb2f78051154d
Author: Marcus Lundblad <ml dfupdate se>
Date:   Fri Jun 10 10:22:27 2022 +0200

    placeEntry: Always include location paramaters
    
    Revert to always include location bias parameters
    to the geocoder regardless of zoom level.

 src/placeEntry.js | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/src/placeEntry.js b/src/placeEntry.js
index f08bf468..853eb23e 100644
--- a/src/placeEntry.js
+++ b/src/placeEntry.js
@@ -280,17 +280,9 @@ export class PlaceEntry extends Gtk.SearchEntry {
         this._cancellable = new Gio.Cancellable();
         this._previousSearch = this.text;
 
-        /* as a stop-gap solution for the location bias tuning issues
-         * in Photon (https://github.com/komoot/photon/issues/600),
-         * for now search "globally" (e.g. without location bias) for
-         * zoom levels above 17, to still allow focused search nearby
-         */
-        let lat = this._mapView.view.zoom_level > 17 ?
-                  this._mapView.view.latitude : null;
-        let lon = this._mapView.view.zoom_level > 17 ?
-                  this._mapView.view.longitude : null;
-
-        GeocodeFactory.getGeocoder().search(this.text, lat, lon,
+        GeocodeFactory.getGeocoder().search(this.text,
+                                            this._mapView.view.latitude,
+                                            this._mapView.view.longitude,
                                             this._cancellable,
                                             (places, error) => {
             this._cancellable = null;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]