Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Nominatim Issues on ajax query? #3306

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments
Closed

Nominatim Issues on ajax query? #3306

openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments

Comments

@openstreetmap-trac
Copy link

Reporter: itay[at]sinapistech.com
[Submitted to the original trac issue database at 5.38am, Monday, 25th October 2010]

I am really confused here...

when ever i am doing an ajax request to nominatim i am getting an empty result back from nominatim
the url i am sending is ok - as if i try to enter the url from the browser i success and getting a valid json result

i had checked the request a bit more at firebug
as i am getting 200 OK message - but the response is RED as an exception
using jquery - once i send the request i am being led into the ajaxError method and not the Success one. as it does look like i am getting an exception

after checking the javascript params which are (httprequest, testmessage, exception)
i am getting testmessage = 'error' and my exception is null??

example url: http://nominatim.openstreetmap.org/search?q=%D7%99%D7%A8%D7%95%D7%A9%D7%9C%D7%99%D7%9D&accept-language=heb&format=json&polygon=1

i am pretty sure the code works
as the code DID work in the past and stopped working the end of last week

to be even more sure i had rolled few versions back using SVN and the issue still remained

I have also uploaded with this some images if needed to show the params of the http request

I had just run tough everything i could and didn't success to find a problem from my side as i am sending a fine http request but not getting a response

@openstreetmap-trac
Copy link
Author

Author: itay[at]sinapistech.com
[Added to the original trac issue at 10.05am, Monday, 25th October 2010]

i had made a test in english - same results
also uploaded another image from chrome on that request
please look at the first exception chrome sends
"
XMLHttpRequest cannot load http://nominatim.openstreetmap.org/search?q=york&accept-language=heb&format=json&polygon=1. Origin http://localhost:3460 is not allowed by Access-Control-Allow-Origin.
"

I'm not as sure 100% what does this means - tought maybe some security issues
My OS is win7
tried running this also from a differente machine with win2003 with the same results

@openstreetmap-trac
Copy link
Author

Author: twain
[Added to the original trac issue at 11.07am, Monday, 25th October 2010]

I don't believe that chrome supports Access-Control-Allow-Origin which means all cross site scripting is blocked. You can use the callback function instead or proxy through a script on your own server.

Test in firefox (3.5) to confirm - it does support Access-Control-Allow-Origin.

@openstreetmap-trac
Copy link
Author

Author: twain
[Added to the original trac issue at 11.10am, Monday, 25th October 2010]

Apologies - I added a typo. Miss-spelt json as josn in one place!
Now fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant