stable: finalized GIS aesthetics and Syria/Jordan routing synchronization
This commit is contained in:
+70
@@ -0,0 +1,70 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GeocodingController = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const swagger_1 = require("@nestjs/swagger");
|
||||
const geocoding_service_1 = require("./geocoding.service");
|
||||
const api_key_guard_1 = require("../common/guards/api-key.guard");
|
||||
let GeocodingController = class GeocodingController {
|
||||
geocodingService;
|
||||
constructor(geocodingService) {
|
||||
this.geocodingService = geocodingService;
|
||||
}
|
||||
async search(query) {
|
||||
return this.geocodingService.searchPlaces(query);
|
||||
}
|
||||
async reverse(lat, lng) {
|
||||
return this.geocodingService.reverseGeocode(lat, lng);
|
||||
}
|
||||
async addPlace(placeData) {
|
||||
return this.geocodingService.addPlace(placeData);
|
||||
}
|
||||
};
|
||||
exports.GeocodingController = GeocodingController;
|
||||
__decorate([
|
||||
(0, common_1.Get)('search'),
|
||||
(0, swagger_1.ApiOperation)({ summary: 'Search for locations (Forward Geocoding)' }),
|
||||
(0, swagger_1.ApiQuery)({ name: 'q', required: true }),
|
||||
__param(0, (0, common_1.Query)('q')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], GeocodingController.prototype, "search", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('reverse'),
|
||||
(0, swagger_1.ApiOperation)({ summary: 'Reverse Geocoding (Lat/Lng to Address)' }),
|
||||
(0, swagger_1.ApiQuery)({ name: 'lat', required: true }),
|
||||
(0, swagger_1.ApiQuery)({ name: 'lng', required: true }),
|
||||
__param(0, (0, common_1.Query)('lat')),
|
||||
__param(1, (0, common_1.Query)('lng')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Number, Number]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], GeocodingController.prototype, "reverse", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)('places'),
|
||||
(0, swagger_1.ApiOperation)({ summary: 'Add a new location (User Submitted)' }),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], GeocodingController.prototype, "addPlace", null);
|
||||
exports.GeocodingController = GeocodingController = __decorate([
|
||||
(0, swagger_1.ApiTags)('geocoding'),
|
||||
(0, common_1.Controller)('geocoding'),
|
||||
(0, common_1.UseGuards)(api_key_guard_1.ApiKeyGuard),
|
||||
__metadata("design:paramtypes", [geocoding_service_1.GeocodingService])
|
||||
], GeocodingController);
|
||||
//# sourceMappingURL=geocoding.controller.js.map
|
||||
Reference in New Issue
Block a user