Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved documentation #39

Open
nonDeath opened this issue May 12, 2022 · 1 comment
Open

Improved documentation #39

nonDeath opened this issue May 12, 2022 · 1 comment

Comments

@nonDeath
Copy link

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.

@sabas
Copy link

sabas commented Mar 14, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants