geojson icon indicating copy to clipboard operation
geojson copied to clipboard

Improved documentation

Open nonDeath opened this issue 3 years ago • 1 comments

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.

nonDeath avatar May 12 '22 14:05 nonDeath

        $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);

sabas avatar Mar 14 '23 11:03 sabas