diff --git a/src/views/Home.vue b/src/views/Home.vue index fcf55c3..1a13db0 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -180,6 +180,26 @@ const handleMapClick = async event => { } catch (error) { console.error("Error fetching reverse geocoding data:", error); } + + const overpassQuery = `[out:json]; +( + node(around:1000,${clickedCoordinate[1]},${clickedCoordinate[0]})["wheelchair"="yes"]; + way(around:1000,${clickedCoordinate[1]},${clickedCoordinate[0]})["wheelchair"="yes"]; + relation(around:1000,${clickedCoordinate[1]},${clickedCoordinate[0]})["wheelchair"="yes"]; +); +out;`; + const overpassUrl = 'https://overpass-api.de/api/interpreter'; + + axios.post(overpassUrl, `data=${encodeURIComponent(overpassQuery)}`, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }).then(response => { + // Process the data returned by the Overpass API + console.log(response.data); + }).catch(error => { + console.error('Error fetching data from Overpass API:', error); + }); }; const closePopup = () => {