1.0.2 • Published 7 years ago
csv-to-kml v1.0.2
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 withfsor produced in any other way.verbose- Optional. Iftruewill 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 thenametag of the KML document. Default:My KML Document.documentDescription- Optional. Value used for thedescriptiontag of the KML document. Default:.