feat: implement manual routing sync system, update map tile URLs to HTTPS, and migrate admin session storage to localStorage
This commit is contained in:
@@ -7,6 +7,7 @@ import axios from 'axios';
|
||||
import { RoadSegmentStat } from './road-stat.entity';
|
||||
import { TrafficGridService } from './traffic-grid.service';
|
||||
import { GeocodingService } from '../geocoding/geocoding.service';
|
||||
import { RedisService } from '../common/redis.service';
|
||||
|
||||
@Injectable()
|
||||
export class MapsService {
|
||||
@@ -19,10 +20,16 @@ export class MapsService {
|
||||
private trafficGrid: TrafficGridService,
|
||||
private geocodingService: GeocodingService,
|
||||
private dataSource: DataSource,
|
||||
private redisService: RedisService,
|
||||
) {
|
||||
this.graphHopperUrl = this.configService.get('GRAPH_HOPPER_URL', 'http://routing:8080');
|
||||
}
|
||||
|
||||
async requestRoutingSync() {
|
||||
await this.redisService.set('routing_sync_requested', '1');
|
||||
return { success: true, message: 'Routing sync requested and scheduled for the next minute.' };
|
||||
}
|
||||
|
||||
|
||||
async getRoute(waypoints: [number, number][], profile: string = 'car', steps: boolean = false, locale: string = 'en', alternatives: boolean = false) {
|
||||
if (waypoints.length < 2) {
|
||||
|
||||
Reference in New Issue
Block a user