chore: add build artifacts, map assets, and routing data

This commit is contained in:
Hamza-Ayed
2026-09-19 12:34:24 +03:00
parent aa2b9f131f
commit 43ad2e0ad4
327 changed files with 52421 additions and 1810 deletions
@@ -35,10 +35,14 @@ class TacticalApiService {
final url = serverUrl ?? defaultServerUrl;
final key = apiKey ?? defaultApiKey;
try {
final serverProfile = (profile == 'convoy' || profile == 'armored' || profile == 'offroad4x4' || profile == 'rapidResponse')
? 'car'
: profile;
final uri = Uri.parse(
'$url/api/maps/route?fromLat=${origin.latitude}&fromLng=${origin.longitude}'
'&toLat=${destination.latitude}&toLng=${destination.longitude}'
'&profile=$profile&steps=true&locale=ar',
'&profile=$serverProfile&steps=true&locale=ar',
);
final resp = await http.get(uri, headers: {'x-api-key': key}).timeout(const Duration(seconds: 10));
@@ -55,6 +59,12 @@ class TacticalApiService {
distanceMeters = (data['distance'] as num?)?.toDouble() ?? 0.0;
durationSec = (data['duration'] as num?)?.toDouble() ?? 0.0;
// Adjust tactical convoy duration
if (profile == 'convoy') durationSec *= 1.45;
if (profile == 'armored') durationSec *= 1.75;
if (profile == 'offroad4x4') durationSec *= 1.1;
if (profile == 'rapidResponse') durationSec *= 0.85;
if (data['points'] is String) {
coords.addAll(PolylineUtils.decode(data['points'] as String));
} else if (data['points'] is List) {