src/Controller/Api/CadastresController.php line 33

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Api;
  3. use App\Services\Api\CadastresService;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\JsonResponse;
  6. use Symfony\Component\HttpFoundation\Request;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. /**
  9.  *@Route("/api/cadastre/parcelles")
  10.  */
  11. class CadastresController extends AbstractController
  12. {
  13.     /**
  14.      * @var CadastresService
  15.      */
  16.     private $cadastresService;
  17.     public function __construct(CadastresService $cadastresService)
  18.     {
  19.         $this->cadastresService $cadastresService;
  20.     }
  21.     /**
  22.      * @Route("/list/gps", name="parcelles_cadastre_list_gps")
  23.      * @param Request $request
  24.      * @return JsonResponse
  25.      */
  26.     public function listCadastresGps (Request $request):JsonResponse {
  27.         return $this->cadastresService->listCadastresGps$request);
  28.     }
  29.     /**
  30.      * @Route("/list/gps/proximity", name="parcelles_cadastre_list_gps_proximity")
  31.      * @param Request $request
  32.      * @return JsonResponse
  33.      */
  34.     public function listCadastresGpsProximity (Request $request):JsonResponse {
  35.         return $this->cadastresService->listCadastresGpsProximity($request);
  36.     }
  37.     /**
  38.      * @Route("/immogo/search", name="parcelles_cadastre_immgo_search")
  39.      * @param Request $request
  40.      * @return JsonResponse
  41.      */
  42.     public function immogoSearch (Request $request):JsonResponse {
  43.         return $this->cadastresService->findParcelByCameraPosition($request);
  44.     }
  45. }