Skip to content

Commit

Permalink
Update autocompleter_controller.js
Browse files Browse the repository at this point in the history
Comments
  • Loading branch information
nimmolo committed Aug 10, 2024
1 parent 6d9e96a commit 9ade58e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/javascript/controllers/autocompleter_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export default class extends Controller {
this.swap({ detail: { type: "location_google" } });
}

// Connects the location_google autocompleter to call map controller methods
// Connects autocompleter to map controller to call its methods
activateMapOutlet(location = false) {
if (!this.hasMapOutlet) {
this.verbose("autocompleter: no map outlet");
Expand All @@ -298,9 +298,9 @@ export default class extends Controller {
// set the map to stop ignoring place input
this.mapOutlet.ignorePlaceInput = false;

// 2024-08-09: Unless the swap call (form-exif) sent request_params lat/lng,
// don't geocode lat/lng when switching to location_google. Usually, this is
// for geolocating place_names and should pay attention to text only.
// Often, this swap to location_google is for geolocating place_names and
// should pay attention to text only. But in some cases the swap (e.g., from
// form-exif) sends request_params lat/lng, so geocode when switching.
if (location) {
// this.mapOutlet.geocodeLatLng(location);
this.mapOutlet.tryToGeocode();
Expand Down

0 comments on commit 9ade58e

Please sign in to comment.