This is a simple example to view kml files in your computer with openlayers
Go to https://nodejs.org/en/ and download the LTS version. We need this to install NPM (https://www.npmjs.com/get-npm) a package manager to make our development life easier. Then go through the following steps to get started.
-
Clone or download this project into your computer
-
Open Command Line (Windows) or Terminal(Linux), browse into the folder where you have downloaded this project
-
Run
npm install
(this will install all the required dependencies for you) -
Run
npm start
(this will start a web server and you can see the result in localhost:8080)