Show a map of the user's current location for setting a pool.

This commit is contained in:
Eli Ribble 2026-01-08 23:20:41 +00:00
parent 12ad9fa483
commit 0cd6697fd4
No known key found for this signature in database
5 changed files with 239 additions and 55 deletions

View file

@ -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}`;