chore: fix url

This commit is contained in:
2026-03-06 17:00:54 +01:00
parent e4462a1d69
commit 40633d437d
2 changed files with 5 additions and 9 deletions
+3 -8
View File
@@ -13,7 +13,7 @@ export interface RouteInfo {
duration: string; // e.g. "8 min" duration: string; // e.g. "8 min"
distanceMeters: number; distanceMeters: number;
durationSeconds: number; durationSeconds: number;
coordinates: LatLng[]; // polyline points coordinates: LatLng[];
} }
export interface NavigationInstruction { export interface NavigationInstruction {
@@ -80,9 +80,7 @@ function formatDistance(meters: number): string {
} }
// ---- Geocode address → coords ---- // ---- Geocode address → coords ----
export async function geocodeAddress( export async function geocodeAddress(address: string): Promise<LatLng | null> {
address: string,
): Promise<LatLng | null> {
try { try {
const url = `https://api.tomtom.com/search/2/geocode/${encodeURIComponent(address)}.json?key=${TOMTOM_API_KEY}&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); const { data } = await axios.get(url);
@@ -189,10 +187,7 @@ export async function calculateRoute(
} }
// ---- Bearing calculation ---- // ---- Bearing calculation ----
export function calculateBearing( export function calculateBearing(from: LatLng, to: LatLng): number {
from: LatLng,
to: LatLng,
): number {
const φ1 = (from.latitude * Math.PI) / 180; const φ1 = (from.latitude * Math.PI) / 180;
const φ2 = (to.latitude * Math.PI) / 180; const φ2 = (to.latitude * Math.PI) / 180;
const Δλ = ((to.longitude - from.longitude) * Math.PI) / 180; const Δλ = ((to.longitude - from.longitude) * Math.PI) / 180;
+2 -1
View File
@@ -27,7 +27,8 @@
"versionCode": 1, "versionCode": 1,
"permissions": [ "permissions": [
"android.permission.VIBRATE" "android.permission.VIBRATE"
] ],
"usesCleartextTraffic": true
}, },
"web": { "web": {
"favicon": "./assets/icon.png" "favicon": "./assets/icon.png"