Show a map of the user's current location for setting a pool.
This commit is contained in:
parent
12ad9fa483
commit
0cd6697fd4
5 changed files with 239 additions and 55 deletions
|
|
@ -36,9 +36,6 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
// Replace with your actual Mapbox access token
|
||||
const MAPBOX_ACCESS_TOKEN = '{{.MapboxToken}}';
|
||||
|
||||
// Display suggestions in the dropdown
|
||||
function displaySuggestions(suggestions) {
|
||||
const suggestionsContainer = document.getElementById('suggestions');
|
||||
|
|
@ -85,6 +82,9 @@ function displaySuggestions(suggestions) {
|
|||
|
||||
// Fetch suggestions from Mapbox API
|
||||
async function fetchGeocodingSuggestions(query) {
|
||||
// Replace with your actual Mapbox access token
|
||||
const MAPBOX_ACCESS_TOKEN = '{{.MapboxToken}}';
|
||||
|
||||
try {
|
||||
const url = `https://api.mapbox.com/search/geocode/v6/forward?q=${encodeURIComponent(query)}&access_token=${MAPBOX_ACCESS_TOKEN}`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue