<?php
namespace App\Controller\Api;
use App\Services\Api\CadastresService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
/**
*@Route("/api/cadastre/parcelles")
*/
class CadastresController extends AbstractController
{
/**
* @var CadastresService
*/
private $cadastresService;
public function __construct(CadastresService $cadastresService)
{
$this->cadastresService = $cadastresService;
}
/**
* @Route("/list/gps", name="parcelles_cadastre_list_gps")
* @param Request $request
* @return JsonResponse
*/
public function listCadastresGps (Request $request):JsonResponse {
return $this->cadastresService->listCadastresGps( $request);
}
/**
* @Route("/list/gps/proximity", name="parcelles_cadastre_list_gps_proximity")
* @param Request $request
* @return JsonResponse
*/
public function listCadastresGpsProximity (Request $request):JsonResponse {
return $this->cadastresService->listCadastresGpsProximity($request);
}
/**
* @Route("/immogo/search", name="parcelles_cadastre_immgo_search")
* @param Request $request
* @return JsonResponse
*/
public function immogoSearch (Request $request):JsonResponse {
return $this->cadastresService->findParcelByCameraPosition($request);
}
}