Browse Source

twigFunctions: evaluate(): use re-newed evaluate() function

master
parent
commit
a9d5d0c01c
  1. 2
      package.json
  2. 16
      src/twigFunctions.js

2
package.json

@ -45,7 +45,7 @@
"openstreetmap-date-parser": "^0.1.2",
"openstreetmap-tag-translations": "git+https://github.com/plepe/openstreetmap-tag-translations.git",
"overpass-frontend": "^2.7.2",
"overpass-layer": "^3.2.0",
"overpass-layer": "^3.2.1",
"query-string": "^6.13.8",
"sheet-router": "^4.2.3",
"sprintf-js": "^1.1.2",

16
src/twigFunctions.js

@ -84,20 +84,14 @@ OverpassLayer.twig.extendFilter('md5', function (value) {
return md5cache[value]
})
OverpassLayer.twig.extendFunction('evaluate', function (tags) {
var ob = {
const ob = {
id: 'x0',
isShown: true,
layer_id: global.currentCategory.id,
object: {
id: 'x0',
meta: {},
tags: tags,
type: 'special'
}
meta: {},
tags: tags,
type: 'special'
}
var d = global.currentCategory.layer.mainlayer.evaluate(ob)
return d
return global.currentCategory.layer.mainlayer.evaluate(ob)
})
function enumerate (list) {
if (!list) {

Loading…
Cancel
Save