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