This commit is contained in:
Hamza-Ayed
2026-03-20 02:14:50 +03:00
parent 65ce6a0ba2
commit 6e6ee55d03
47 changed files with 14706 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import { Controller, Get, Query } from '@nestjs/common';
import { ApiTags, ApiOperation } from '@nestjs/swagger';
import { MapsService } from './maps.service';
@ApiTags('maps')
@Controller('maps')
export class MapsController {
constructor(private readonly mapsService: MapsService) {}
@Get('route')
@ApiOperation({ summary: 'Calculate a route between two points 🚗' })
async getRoute(
@Query('fromLat') fromLat: number,
@Query('fromLng') fromLng: number,
@Query('toLat') toLat: number,
@Query('toLng') toLng: number,
) {
return this.mapsService.getRoute([fromLat, fromLng], [toLat, toLng]);
}
@Get('config')
@ApiOperation({ summary: 'Get map configuration for the region 🗺️' })
async getConfig() {
return this.mapsService.getMapConfig();
}
}