Loding kml from local drive

Is their a way to load a KmlDataSource from a local drive? In my app the kml files generated and updated on the client PC? I was not sucessful to laod the kml file into da datasource (Cesium.KmlDataSource(C:…).
Probably a newbie mistake :wink:

Thanks for any help…

It would probably be something like:


(i.e. specify protocol and use forward slashes.)

But there are cases where you just can't use "file://", something to do
with cross site scripting security etc. Then you have to run an HTTP
server, but that's easy:

C:\Python27\python -m SimpleHTTPServer

will run a simple HTTP server in the folder you command prompt was at
when you enter the above. Windows firewall may pop up, you can tell it
it's ok for local machines.

Then you can browse to to see the content of
the folder your ran that from, click on you HTML file there, and links
to local files should work. Note, now you'd leave the protocol off,
i.e. don't use file, and it will default to http:// same as the
page you just loaded.

Hope that helps.

Cheers -Terry