diff --git a/src/views/Home.vue b/src/views/Home.vue index 27f4625..e392d98 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -14,30 +14,52 @@ - - + +
+ +
+ + mdi-crosshairs-gps +
-
- -
+ + + + + + + mdi-map-marker + + {{ result.display_name }} + + + { + showSearchBar.value = !showSearchBar.value; +}; const moveToLocation = (result) => { - // Extract latitude and longitude from the selected result const lat = parseFloat(result.lat); const lon = parseFloat(result.lon); - - // Update the center coordinates to move the camera to the selected location center.value = [lon, lat]; + showSearchBar.value = false; }; const performSearch = async () => { @@ -100,14 +125,12 @@ const performSearch = async () => { `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(searchQuery.value)}` ); - // Process the search results and limit to, let's say, 5 results searchResults.value = response.data.slice(0, 5); } catch (error) { console.error("Error fetching search results:", error); } }; - //Show API const handleMapClick = async event => { const clickedCoordinate = event.coordinate;