Johannes Zellner 8 tahun lalu
induk
melakukan
be23ae34c9
1 mengubah file dengan 3 tambahan dan 6 penghapusan
  1. 3 6
      public/index.js

+ 3 - 6
public/index.js

@@ -125,14 +125,11 @@ app = new Vue({
             this.markerDetailsOpen = false;
 
             var params = {
-                search: queryString
+                search: this.querySearchString,
+                lat: map.getCenter().latitude,
+                lon: map.getCenter().longitude
             };
 
-            if (position && position.coords) {
-                params.lat = position.coords.latitude;
-                params.lon = position.coords.longitude;
-            }
-
             axios.get('/api/places', {
                 params: params
             }).then(function (response) {