From fe0980d45a8ae4a09fcf688ade8003c73c26eb11 Mon Sep 17 00:00:00 2001 From: Gustavo Luigi Date: Thu, 1 Sep 2022 13:27:25 +0200 Subject: [PATCH] add restrictions country de in address result --- content/pages/checkout.blade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/pages/checkout.blade.php b/content/pages/checkout.blade.php index d9a7625..8236bfe 100644 --- a/content/pages/checkout.blade.php +++ b/content/pages/checkout.blade.php @@ -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;