Hi,
I have a problem with adding KML file to OpenLayers. The code I'm using is 
written below:

var body = new OpenLayers.Layer.GML("body", 'data/body/bodyGIS.kml', {
format: OpenLayers.Format.KML,
formatOptions: {
'extractStyles': true
}
});
map.addLayer(body);

The KML file is in my computer and Javascript Console in Google Chrome is 
telling me this:
 
"XMLHttpRequest cannot load 
file:///D:/skola/diplomka/zkouska/uplneOdZacatku/data/body/bodyGIS.kml. Cross 
origin requests are only supported for HTTP."

Do you anybody know, how fix this problem? I couldn't find the solution :(.
Thanks

P.S. I'm beginner in JavaScript and OL and this discussion.

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to