Load local .kml files into the plug-in via ActiveX
Usage:
1) To make the example work add the page to the
"trusted sites" zone in Internet Explorer.
2) Change the security setting for
"initialize and script activex controls not marked safe for scripting" in
"trusted sites" from
"disable" to
"prompt"
3) Click on the
"Browse" button and select a kml file on your machine (e.g. C:\test.kml)
4) Click the
"load kml" button.
5) When prompted click
"yes" in the confirmation dialogue to allow the interaction.
Notes:
1) This example will only work in Internet Explorer as it uses ActiveXObject("Scripting.FileSystemObject")
2) There may be additional security settings to configure if the
"trusted sites" zone does not have the default settings on your machine.
Further reading:
Trusted Sites Zone - How to use security zones in Internet Explorer
FileSystemObject - General information on the FileSystemObject
Parsing KML - Convert KML into JavaScript
ActiveX Security - ActiveX controls intended to run in Internet Explorer
Output:
Other examples:
Calculation of geodesics using the Haversine formula
Load local .kml files into the plug-in via ActiveX
Random placemarks, CGI Scripting for KML
geApp - Google Earth Plug-in in a windows application.