[OpenLayers-Users] Overpass API request not working in OL 2.12

hudson p.saalmann at web.de
Tue Jul 3 01:36:42 PDT 2012


erilem wrote
> 
> This is a Same Origin Policy issue. I'd be very surprised that 2.11
> and 2.12 behave differently with respect to that.
> 

Hi,
I somehow faced the same issue when I tried to update my map from OL2.11 to
OL2.12 yesterday.
I am also using a VectorLayer with OpenLayers.Protocol.HTTP in order to
query a GeoRSS XML file which is served with
“Access-Control-Allow-Origin:*”. Everything works fine using OL2.11, however
when I use OL2.12 the console in Chrome displays the following error:
“XMLHttpRequest cannot load http://*******. Origin file:// is not allowed by
Access-Control-Allow-Origin.” and requests an Options request as Juergen
mentions above. 
This error is caused as well when I put the map on the same server. Only
when I use a relative path statement (on the same server) it works. But I
would like to request the xml from another server…
Do you know how to solve this cross origin issue? Is this caused by the new
version of XMLHttpRequest.js included in OL2.12?
Thank you in advance.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Overpass-API-request-not-working-in-OL-2-12-tp4985359p4985569.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list