Try this way:
var layerKml = new OpenLayers.Layer.Vector("KML",{
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "http://<server>/<project>/<dir>/lines.kml",
format: new OpenLayers.Format.KML
})
});



Em 10/02/2011 08:08, vrbikdan < [email protected] > escreveu:
Phil Scadden writes:

>
> Just another thought. Your html file is ALSO on the server ?(you arent
> trying to have a local file accessing a remote server file?).

So do You think, that it should be problem? Yes I have all files (html, css, js)
in my computer, only kml file I have on server now because when I had all
files only in computer, I had problem with cross origin request (I wrote it
before). I would like to paste other files to the server, but now I have
some troubles with connection, but I'll try it :).

Firebug is telling me this:
GET http://dvphoto.xf.cz/dp/linie/cyklo2_ln.kml, 206 Partial Content, 5.14s
XMLHttpRequest.js (line 222)
and in XMLHttpRequest.js at line 222 is this: this._object.send(vData);
but for me this is black magic, I absolutelly don't understand this
j s file :)

btw. why is it problem to have some files in computer and some at server?
In fact I could use OpenLayers files without downloading it into my pc
and there isn't any problem, isn't it?

P.S. sorry for a lot of questions, but I'm really _javascript_ beginner :)

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

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

Reply via email to