Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dominicrico/kml2svg

Convert KML route to SVG path
https://github.com/dominicrico/kml2svg

Last synced: 9 days ago
JSON representation

Convert KML route to SVG path

Awesome Lists containing this project

README

        

[![NPM](https://nodei.co/npm/kml2svg.png)](https://nodei.co/npm/kml2svg/)

##Installation
Use the node package manager (npm) for easy installation.

```
npm install --save kml2svg
```
**or**

```
npm install -g kml2svg
```

##Usage

###CLI
To convert a Google Maps route
```
kml2svg https://www.google.com/maps/dir/50.4525038,6.9169664/50.4431304,6.9153357/@50.4478022,6.9122579,16z
```

To convert a KML file
```
kml2svg path/to/kml/file.kml
```
###Programmable

```
var kml2svg = require('kml2svg');

//for a GoogleMaps route
var svgObj = kml2svg('https://www.google.com/maps/dir/50.4525038,6.9169664/50.4431304,6.9153357/@50.4478022,6.9122579,16z');

//for a .kml file
var svgObj = kml2svg('path/to/kml/file.kml');

//returns a html document with the svg path of your route
/*












*/
```