Add API for getting just the closest reverse geocoded answer
Because we don't care about anything that is nearby when the user clicks on the map, we just want the closest thing.
This commit is contained in:
parent
b92697b8c8
commit
96498c01bf
6 changed files with 132 additions and 44 deletions
|
|
@ -102,6 +102,7 @@ func AddRoutes(r *mux.Router) {
|
|||
geocode := resource.Geocode(router)
|
||||
r.Handle("/geocode/by-gid/{id:.*}", handlerJSON(geocode.ByGID)).Methods("GET")
|
||||
r.Handle("/geocode/reverse", handlerJSONPost(geocode.Reverse)).Methods("POST")
|
||||
r.Handle("/geocode/reverse/closest", handlerJSONPost(geocode.ReverseClosest)).Methods("POST")
|
||||
r.Handle("/geocode/suggestion", handlerJSONSlice(geocode.SuggestionList)).Methods("GET")
|
||||
publicreport := resource.Publicreport(router)
|
||||
r.Handle("/publicreport/{id}", handlerBasic(publicreport.ByID)).Methods("GET").Name("publicreport.ByIDGet")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue