csv-to-kml
v1.0.2
Published
Geocodes addresses from CSV and generates a KML file
Downloads
6
Maintainers
Readme
csv-to-kml
Geocodes addresses from CSV and generates a KML file.
Usage
Example
require("csv-to-kml").convert({
data: csvData,
verbose: true,
geocoderOptions: { provider: "google" },
csvOptions: { delimiter : "|" },
documentName: "A List of Places"
}).then(kmlData => {
// Do whatever you want with the KML generated
}).catch(error => {
// Catch errors
})
Options
csvData
- Required. CSV data read from a file withfs
or produced in any other way.verbose
- Optional. Iftrue
will log some stuff on console. Default:false
.csvOptions
- Optional. This object will be passed to the CSV parser. See (csvjson)[https://www.npmjs.com/package/csvjson] for details. Default{ delimiter : ";" }
.geocoderOptions
- Optional. This object will be passed to the geocoder. See (node-geocoder)[https://www.npmjs.com/package/node-geocoder] for details. Default{ provider: "google" }
.documentName
- Optional. Value used for thename
tag of the KML document. Default:My KML Document
.documentDescription
- Optional. Value used for thedescription
tag of the KML document. Default: ``.