ushahidi / Ushahidi_Web

Ushahidi v2. A platform that allows information collection, visualization and interactive mapping, allowing anyone to submit information through text messaging using a mobile phone, email or web form.
http://www.ushahidi.com
Other
898 stars 624 forks source link

Support for GeoJSON format into REST API #758

Open francbartoli opened 12 years ago

francbartoli commented 12 years ago

It would be great to fetch data as GeoJSON formatted output. I'm guessing a kind of such thing:

http:///api?task=incidents&output=geojson

if you do not want to make this geographical specification as the default kind of json output

jazzido commented 10 years ago

+1

rjmackay commented 10 years ago

As per #970

There's already partial support for GeoJSON since this is how we load the reports layer into OpenLayers.. All handled through the json controller. The urls are: /json - individual reports /json/cluster - clustered reports /json/single/ID - single report and its closest neighbours

There are a few query params you can pass to filter this down: start time - s (as a unix timestamp I think) end time - e (as a unix timestamp I think) category - c

This should be merged into the API, but most likely won't happen in the 2.x codebase. Rather we'll try to get it right in 3.0

This has infact already been built into the 3.0 core api..

bodacea commented 10 years ago

I've added this to the V3 features wishlist at https://phabricator.ushahidi.com/T559; please feel free to continue working on this for V2.