open311 / open311.github.io

Open311 Specs and Wiki
http://wiki.open311.org
32 stars 41 forks source link

Add geospatial boundary arguments for GET Requests #39

Open peterwtux opened 10 years ago

peterwtux commented 10 years ago

On our long-range plan has been enhancing the UI to add map pins for open requests of the selected service type, e.g. use /requests.json?status=open&service_code=pothole&long_ne=-79&lat_ne=39&long_sw=-80&lat_sw=38 to obtain data about open tickets in the currently visible map extent. This would help prevent duplicate requests, and provide a way for customers to add comments to existing requests.

I think this should be speced as taking two bounding box coordinates, e.g. NorthEast and SouthWest. The queries would be simpler on the backend for anyone using simple floats for coordinates instead of geospatial datatypes, and a rectangular box better matches our primary UIs (rectangular interactive maps).

peterwtux commented 10 years ago

I'd like to modify the proposal to use what SeeClickFix already has in place for the NE and SW coordinates' argument names (http://dev.seeclickfix.com/#geography): max_lng=-79&max_lat=39&min_lng=-80&min_lat=38