đ Emergency call location
The patient's address is instantly geocoded for precise GPS coordinates, even for rural or incomplete addresses.
GET /geocoding/forward Every minute counts. TMaps helps your medical teams arrive faster.
Endpoints used
GET /distance-matrix POST /routing/optimized GET /routing/direction clinics & hospitals Tunis
nearest ambulance
vs manual dispatching
Click markers to view details · Map powered by TMaps
MedRoute TN
MedRoute TN equips emergency services at several Tunisian clinics. The TMaps Routing API calculates in real time the fastest path to the patient, accounting for traffic. The distance matrix helps automatically assign the nearest ambulance.
// Ambulance la plus proche â API TMaps
const matrix = await fetch(
'https://api.tmaps.tn/distance-matrix',
{
method: 'POST',
headers: { 'Authorization': 'Bearer YOUR_KEY' },
body: JSON.stringify({
origins: ambulances.map(a => ({ lat: a.lat, lng: a.lng })),
destinations: [{ lat: 36.8000, lng: 10.1815 }], // patient
profile: 'driving',
}),
}
);
const { durations } = await matrix.json();
// Trouver l'ambulance la plus proche
const nearest = ambulances[
durations.indexOf(Math.min(...durations))
];The patient's address is instantly geocoded for precise GPS coordinates, even for rural or incomplete addresses.
GET /geocoding/forward The distance matrix calculates travel time from each available ambulance to the patient to designate the nearest one.
GET /distance-matrix The ambulance receives the optimal route with turn-by-turn navigation, updated in real time if traffic changes.
POST /routing/optimized Start free with 50,000 requests offered every month. No credit card required.
Read the documentation â