chore: fix gps
This commit is contained in:
@@ -84,7 +84,7 @@ export async function geocodeAddress(
|
||||
address: string,
|
||||
): Promise<LatLng | null> {
|
||||
try {
|
||||
const url = `https://api.tomtom.com/search/2/geocode/${encodeURIComponent(address)}.json?key=${TOMTOM_API_KEY}&countrySet=FR&limit=1`;
|
||||
const url = `https://api.tomtom.com/search/2/geocode/${encodeURIComponent(address)}.json?key=${TOMTOM_API_KEY}&limit=1`;
|
||||
const { data } = await axios.get(url);
|
||||
if (data.results && data.results.length > 0) {
|
||||
const pos = data.results[0].position;
|
||||
|
||||
Reference in New Issue
Block a user