I am working on a project using OpenLayers. And I get the "Access is denied" error on IE only. I know there are some solutions to (maybe) easier problems:
SCRIPT5: Access is denied in IE9 on xmlhttprequest
Access denied to jQuery script on IE
But my restriction is that I cannot modify any library that I am using. But since this is a common problem, maybe OpenLayers has some solution ready and I just cannot find the right syntax to use it.
var sundials = new OpenLayers.Layer.Vector("KML", {
projection: map.displayProjection,
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "london_shapes.kml",
format: new OpenLayers.Format.KML({
extractStyles: true,
extractAttributes: true
})
})
});
map.addLayers([wms]);
map.addLayers([sundials]);//if you comment this, the error disappears
//so it is obvious that the script cannot load london_shapes.kml under IE.
http://jsfiddle.net/dt1510/huepP/5/
Question: Is there an OpenLayers standard way to get rid of the IE problem?
EDIT:
Here is a simpler demonstration of my problem:
The following web page works both in IE and Firefox: http://www.openlayers.org/dev/examples/kml-layer.html
However if I download it, it works only in Firefox, IE7 and not in IE8/IE9. I need the web page work when it is on the client's computer and not online.