If we got an identified location at ajax check time, renormalize lat/lon and naming. This'll match other displays of the names more consistently (Opera Plaza, San Francisco, CA, US instead of Opera Plaza, US)
This commit is contained in:
parent
e3850e5273
commit
96ce2262f8
@ -52,7 +52,12 @@ class GeocodeAction extends Action
|
|||||||
}
|
}
|
||||||
$this->lat = $this->trimmed('lat');
|
$this->lat = $this->trimmed('lat');
|
||||||
$this->lon = $this->trimmed('lon');
|
$this->lon = $this->trimmed('lon');
|
||||||
$this->location = Location::fromLatLon($this->lat, $this->lon);
|
$location = Location::fromLatLon($this->lat, $this->lon);
|
||||||
|
if ($location) {
|
||||||
|
$this->location = Location::fromId($location->location_id, $location->location_ns);
|
||||||
|
$this->lat = $this->location->lat;
|
||||||
|
$this->lon = $this->location->lon;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user