onlygoodness LiteCart Fan Frá Netherlands Meðlimur síðan nóv. 2020 onlygoodness 28 jan. 2022 13:14 Wow Nice script, only it won't show a city on my webpage. Anyone a Clue?
tim Founder Frá Sweden Meðlimur síðan maí 2013 tim 28 jan. 2022 16:33 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 Frá Netherlands Meðlimur síðan nóv. 2020 onlygoodness 28 jan. 2022 17:20 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 Frá Sweden Meðlimur síðan maí 2013 tim 29 jan. 2022 00:03 I wonder if this fallback chain will work: $(':input[name="city"]').val(data.address.city || data.address.village || '');
onlygoodness LiteCart Fan Frá Netherlands Meðlimur síðan nóv. 2020 onlygoodness 29 jan. 2022 09:03 He Tim, It works here!
tim Founder Frá Sweden Meðlimur síðan maí 2013 tim 30 jan. 2022 22:02 I updated with the following fallback: $(':input[name="city"]').val(data.address.city || data.address.town || data.address.village || '');