Skip to content

Generate normalized GeoJSON #113

Open
@sribna

Description

@sribna

Readme says I can use toJson() method to get a GeoJSON string

$point = new Point(40.7484404, -73.9878441);
$point->toJson();

// {
//   "type": "Feature",
//   "properties": {},
//   "geometry": {
//     "type": "Point",
//     "coordinates": [
//       -73.9878441,
//       40.7484404
//     ]
//   }
// }

In reality it returns {"type":"Point","coordinates":[-73.9878441,40.7484404]} whish is't a valid GeoJson format

Maybe add toGeoJson method?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions