chore: build
This commit is contained in:
@@ -2,7 +2,6 @@ import axios from "axios";
|
||||
|
||||
const TOMTOM_API_KEY = "MERY8I7LMeYVSLKO5WuV73W9rKJpBLoB";
|
||||
|
||||
// ---- Types ----
|
||||
export interface LatLng {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
@@ -24,7 +23,6 @@ export interface NavigationInstruction {
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
// ---- Maneuver translations (FR) ----
|
||||
export const maneuverTranslations: Record<string, string> = {
|
||||
TURN_LEFT: "Tournez à gauche",
|
||||
TURN_RIGHT: "Tournez à droite",
|
||||
@@ -48,7 +46,6 @@ export const maneuverTranslations: Record<string, string> = {
|
||||
WAYPOINT_REACHED: "Point de passage atteint",
|
||||
};
|
||||
|
||||
// Ionicons name per maneuver
|
||||
export const maneuverIcons: Record<string, string> = {
|
||||
TURN_LEFT: "arrow-back",
|
||||
TURN_RIGHT: "arrow-forward",
|
||||
@@ -79,7 +76,6 @@ function formatDistance(meters: number): string {
|
||||
return `${(meters / 1000).toFixed(1)} km`;
|
||||
}
|
||||
|
||||
// ---- Geocode address → coords ----
|
||||
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}&limit=1`;
|
||||
@@ -96,7 +92,6 @@ export async function geocodeAddress(address: string): Promise<LatLng | null> {
|
||||
return null;
|
||||
}
|
||||
|
||||
// ---- Calculate route ----
|
||||
export async function calculateRoute(
|
||||
origin: LatLng,
|
||||
destination: LatLng,
|
||||
|
||||
Reference in New Issue
Block a user