async function searchLocation(query, limit = 10) { const url = `/map-location/autocomplete?q=${encodeURIComponent(query)}&limit=${limit}`; try { const response = await fetch(url); const data = await response.json(); return data; } catch (error) { throw new Error('Erreur lors de la recherche'); } }