WIP: Add GeoImage (georeferenced image)
This commit is contained in:
21
src/Controller/GeoImageController.php
Normal file
21
src/Controller/GeoImageController.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use App\Entity\GeoImage;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
class GeoImageController extends AbstractController
|
||||
{
|
||||
#[Route('/geoimage', name: 'app_geo_image')]
|
||||
public function index(EntityManagerInterface $em): JsonResponse
|
||||
{
|
||||
$repo = $em->getRepository(GeoImage::class);
|
||||
$geoImages = $repo->findAllWithGeometry();
|
||||
|
||||
return $this->json($geoImages);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user