You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
491 B
24 lines
491 B
class ExportOSMXML {
|
|
constructor (conf) {
|
|
this.conf = conf
|
|
this.elements = {}
|
|
}
|
|
|
|
each (ob, callback) {
|
|
ob.object.exportOSMJSON(this.conf, this.elements, callback)
|
|
}
|
|
|
|
finish (list) {
|
|
return {
|
|
content: JSON.stringify({
|
|
version: '0.6',
|
|
generator: 'OpenStreetBrowser',
|
|
elements: Object.values(this.elements)
|
|
}, null, ' '),
|
|
fileType: 'application/json',
|
|
extension: 'osm.json'
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = ExportOSMXML
|