dev-master
9999999-dev http://www.rogeriolino.comGeoJson Doctrine Models
MIT
The Requires
- php >=5.4
- doctrine/orm 2.*
json doctrine geojson gis
Wallogit.com
2017 © Pedro PelĂĄez
GeoJson Doctrine Models
GeoJson Doctrine Models, (*1)
<?php
$feature = new Feature();
$feature->add(new Property('name', 'Rogerio Lino'));
$feature->setGeometry(
(new Geometry('Point'))
->add(new Coordinate(-40, -20, 0))
);
$entityManager->persist($feature);
$entityManager->flush();
<?php
$features = $entityManager
->getRepository('RogerioLino\Doctrine\GeoJson\Feature')
->findAll();
echo json_encode(new FeatureCollection($features));
JSON Output, (*2)
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-40,
-20,
0
]
},
"properties": {
"name": "Rogerio Lino"
}
}
]
}
GeoJson Doctrine Models
MIT
json doctrine geojson gis