itinero / routing-api

An API based on Itinero.
MIT License
13 stars 16 forks source link

demo url cause error #2

Closed ironromeo closed 7 years ago

ironromeo commented 7 years ago

I am trying http://localhost:3467/belgium/routing?profile=car&loc=51.055207,3.722992&loc=50.906497,4.194031 but get error: Nancy.RequestExecutionException: Oh noes! ---< System.ArgumentException: View name and model parameters cannot both be null.

How to fix this?

xivk commented 7 years ago

Did you place the routerdb in the data folder? What happens when you open the start page:

http://localhost:5000/

ironromeo commented 7 years ago

All setup and start up looks alright. But if i request http://localhost:3467/belgium/routing?profile=car&loc=51.055207,3.722992&loc=50.906497,4.194031 then get "500 - Internal Server Error". I debugged application and found that RoutingModule simple finish with "return Negotiate.WithStatusCode(HttpStatusCode.NotFound);" So actually two problems 1) how to configure itinero api in order to get HttpStatusCode.NotFound but not 500? 2) how to fix sample db (or url) in order to see expected json data?

ironromeo commented 7 years ago

I investigated my problem and found it is possible to get json in browser if use browser extensions like that https://chrome.google.com/webstore/detail/requestly-redirect-url-mo/mdnleldcmiljblolnjhpnblkcekpdkpa?utm_source=chrome-app-launcher-info-dialog and modify header "Accept: application/json".

xivk commented 7 years ago

Yes, that's it exactly, I'll investigate if I can make it return json by default.