UNPKG

overpass-frontend

Version:

A JavaScript (NodeJS/Browser) library to easily access data from OpenStreetMap via Overpass API or from an OSM File. The objects can directly be used with LeafletJS or exported to GeoJSON. Data will be cached in the browser memory.

26 lines (21 loc) 596 B
const EvaluatorFunction = require('../EvaluatorFunction') module.exports = class EvaluatorFunctionLength extends EvaluatorFunction { eval (context) { const value = this.parameters[0].eval(context) console.log(value) return value } toString (options) { const param = this.parameters.map(p => p.toString(options)) if (options.toString === true) { return this.fun + '(' + param.join(',') + ')' } return param.join(',') } toValue () { return this.parameters[0].toValue() } compileLokiJS () { return this.parameters[0].compileLokiJS() } }