onlygoodness LiteCart Fan Fra Netherlands Medlem siden nov. 2020 onlygoodness jan. 28 2022 01:14 p.m. Wow Nice script, only it won't show a city on my webpage. Anyone a Clue?
tim Founder Fra Sweden Medlem siden mai 2013 tim jan. 28 2022 04:33 p.m. It does for me, thinking this is maybe different in different locations? Can you peek in the Network tab under the F12 console what the network request response to openstreetmap.org contains?
onlygoodness LiteCart Fan Fra Netherlands Medlem siden nov. 2020 onlygoodness jan. 28 2022 05:20 p.m. I have the solution! changing $(':input[name="city"]').val(data.address.city || ''); to $(':input[name="city"]').val(data.address.village || ''); worked for me. Thanks found it in the network tab!
tim Founder Fra Sweden Medlem siden mai 2013 tim jan. 29 2022 12:03 a.m. I wonder if this fallback chain will work: $(':input[name="city"]').val(data.address.city || data.address.village || '');
onlygoodness LiteCart Fan Fra Netherlands Medlem siden nov. 2020 onlygoodness jan. 29 2022 09:03 a.m. He Tim, It works here!
tim Founder Fra Sweden Medlem siden mai 2013 tim jan. 29 2022 11:06 p.m. Excellent, I will update it.
tim Founder Fra Sweden Medlem siden mai 2013 tim jan. 30 2022 10:02 p.m. I updated with the following fallback: $(':input[name="city"]').val(data.address.city || data.address.town || data.address.village || '');