add backend server setup with environment configuration, tile caching, and bus stop fetching functionality

This commit is contained in:
ImBenji
2026-03-31 16:37:34 +01:00
parent 618f3dd3ed
commit 49fc04591b
27 changed files with 1536 additions and 374 deletions
@@ -2,10 +2,11 @@ import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:latlong2/latlong.dart';
import 'package:rra_app/pages/map/constants.dart';
class OsrmRoutingService {
const OsrmRoutingService({
this.baseUrl = 'https://router.project-osrm.org',
this.baseUrl = kBackendBaseUrl,
this.profile = 'driving',
});
@@ -21,8 +22,7 @@ class OsrmRoutingService {
.map((point) => '${point.longitude},${point.latitude}')
.join(';');
final uri = Uri.parse(
'$baseUrl/route/v1/$profile/$coordinates'
'?overview=full&geometries=geojson',
'$baseUrl/route?waypoints=$coordinates&profile=$profile',
);
final response = await http.get(uri);