Skip to content

Make /api/all?geojson return valid GeoJSON #198

@thefinn93

Description

@thefinn93

Currently /api/all?geojson returns something like GeoJSON, but with an extra layer around it:

{
   "data":{
      "type":"FeatureCollection",
      "features":[
         {
            "type":"Feature",
            "id":"fc00::",
            "geometry":{
               "type":"Point",
               "coordinates":[
                  -73.9823,
                  40.6761
               ]
            },
            "properties":{
               "Contact":"blah blah blah",
               "Details":"blah blah blah",
               "OwnerName":"blah blah blah",
               "PGP":"0000000000000000",
               "Status":1920
            }
         }
      ]
   },
   "error":null
}

While valid GeoJSON does not have a "data" key:

{
   "type":"FeatureCollection",
   "features":[
      {
         "type":"Feature",
         "id":"fc00::",
         "geometry":{
            "type":"Point",
            "coordinates":[
               -73.9823,
               40.6761
            ]
         },
         "properties":{
            "Contact":"blah blah blah",
            "Details":"blah blah blah",
            "OwnerName":"blah blah blah",
            "PGP":"0000000000000000",
            "Status":1920
         }
      }
   ]
}

This is causing problems exporting data and importing it into other maps, such as NodeShot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions