geojson
geojson copied to clipboard
Improved documentation
Hello!
I try to use this package, but the examples in the USAGE.md file is not clear for me...
In my case I need to extract points from database and then serve as API to the client, that's show a map with a mapbox gl implementation.
Can you please let me an real example? If you can... In the meantime I'll try to deal with this. If I can reach my goal I'll a PR with my usage example.
Thanks in advance. Regards.
$properties = [
'test' => 'value'
];
$point = new \GeoJson\Geometry\Point([1, 1]);
$feature = new \GeoJson\Feature\Feature($point, $properties);
$collection = new \GeoJson\Feature\FeatureCollection([$feature]);
echo json_encode($collection);