add restrictions country de in address result
parent
a557e17586
commit
fe0980d45a
|
@ -185,8 +185,9 @@
|
|||
}
|
||||
function initialize() {
|
||||
clearAddressFields();
|
||||
var input = document.getElementById('field_location');
|
||||
var autocomplete = new google.maps.places.Autocomplete(input);
|
||||
let input = document.getElementById('field_location');
|
||||
let options = { componentRestrictions: {country: "de"} };
|
||||
var autocomplete = new google.maps.places.Autocomplete(input, options);
|
||||
autocomplete.addListener("place_changed", () => {
|
||||
const place = autocomplete.getPlace();
|
||||
if (!place.geometry) return;
|
||||
|
|
Loading…
Reference in New Issue