forked from MapComplete/MapComplete
Add current view popup
This commit is contained in:
commit
c76b0a6340
9 changed files with 116 additions and 45 deletions
|
@ -180,8 +180,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:schuko~*",
|
||||
"socket:schuko!=1",
|
||||
""
|
||||
"socket:schuko!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -202,8 +201,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:typee~*",
|
||||
"socket:typee!=1",
|
||||
""
|
||||
"socket:typee!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -250,8 +248,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:chademo~*",
|
||||
"socket:chademo!=1",
|
||||
""
|
||||
"socket:chademo!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -298,8 +295,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:type1_cable~*",
|
||||
"socket:type1_cable!=1",
|
||||
""
|
||||
"socket:type1_cable!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -346,8 +342,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:type1~*",
|
||||
"socket:type1!=1",
|
||||
""
|
||||
"socket:type1!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -394,8 +389,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:type1_combo~*",
|
||||
"socket:type1_combo!=1",
|
||||
""
|
||||
"socket:type1_combo!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -442,8 +436,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:tesla_supercharger~*",
|
||||
"socket:tesla_supercharger!=1",
|
||||
""
|
||||
"socket:tesla_supercharger!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -490,8 +483,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:type2~*",
|
||||
"socket:type2!=1",
|
||||
""
|
||||
"socket:type2!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -538,8 +530,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:type2_combo~*",
|
||||
"socket:type2_combo!=1",
|
||||
""
|
||||
"socket:type2_combo!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -586,8 +577,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:type2_cable~*",
|
||||
"socket:type2_cable!=1",
|
||||
""
|
||||
"socket:type2_cable!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -634,8 +624,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:tesla_supercharger_ccs~*",
|
||||
"socket:tesla_supercharger_ccs!=1",
|
||||
""
|
||||
"socket:tesla_supercharger_ccs!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -762,8 +751,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:USB-A~*",
|
||||
"socket:USB-A!=1",
|
||||
""
|
||||
"socket:USB-A!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -806,8 +794,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:bosch_3pin~*",
|
||||
"socket:bosch_3pin!=1",
|
||||
""
|
||||
"socket:bosch_3pin!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
@ -850,8 +837,7 @@
|
|||
"if": {
|
||||
"and": [
|
||||
"socket:bosch_5pin~*",
|
||||
"socket:bosch_5pin!=1",
|
||||
""
|
||||
"socket:bosch_5pin!=1"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
|
|
|
@ -3,7 +3,6 @@ import {Utils} from "../../../Utils";
|
|||
import {TagRenderingConfigJson} from "../../../Models/ThemeConfig/Json/TagRenderingConfigJson";
|
||||
import ScriptUtils from "../../../scripts/ScriptUtils";
|
||||
import {LayerConfigJson} from "../../../Models/ThemeConfig/Json/LayerConfigJson";
|
||||
import {TagsFilter} from "../../../Logic/Tags/TagsFilter";
|
||||
|
||||
|
||||
function colonSplit(value: string): string[] {
|
||||
|
@ -122,7 +121,7 @@ function run(file, protojson) {
|
|||
// We add a second time for any amount to trigger a visualisation; but this is not an answer option
|
||||
const no_ask_json = {
|
||||
if: {
|
||||
and:Utils.NoNull( [`${e.key}~*`, `${e.key}!=1`, ...e.extraVisualisationCondition.split(";")])
|
||||
and:Utils.NoEmpty( [`${e.key}~*`, `${e.key}!=1`, ...e.extraVisualisationCondition.split(";")])
|
||||
},
|
||||
then: txt,
|
||||
hideInAnswer: true
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{
|
||||
"id": "current_view",
|
||||
"description": "A meta-layer which contains one single feature, namely the BBOX of the current map view. This can be used to trigger special actions. If a popup is defined for this layer, this popup will be accessible via an extra button on screen",
|
||||
"description": "A meta-layer which contains one single feature, namely the BBOX of the current map view. This can be used to trigger special actions. If a popup is defined for this layer, this popup will be accessible via an extra button on screen.\n\nThe icon on the button is the default icon of the layer, but can be customized by detecting 'button=yes'.",
|
||||
"source": {
|
||||
"osmTags": "id=currentView"
|
||||
"osmTags": "current_view=yes"
|
||||
},
|
||||
"shownByDefault": false,
|
||||
"title": "Current View",
|
||||
"tagRenderings": [],
|
||||
"mapRendering": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue