[OpenLayers-Users] Re: adding KML file

Phil Scadden p.scadden at gns.cri.nz
Thu Feb 10 15:34:21 EST 2011


> 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 :).
Well only Chrome has issues with XHR to local files. However, all 
browsers are going to have trouble
html in one local trying to do XHR to another. If they didnt protect 
against this, then creating malicious web pages would be very easy. If 
you absolutely had to have kml local, there might be hard to achieve it, 
but only if you are prepared to edit the kml to use the JSONP mechanism 
(so they would no longer be actually kml). You would have to fiddle 
Openlayers too which might be quite a mission.

-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Users mailing list