Optimizing trees theme and clustering

This commit is contained in:
Pieter Vander Vennet 2021-10-15 18:48:33 +02:00
parent 5ac035be20
commit 8fca373437
11 changed files with 125 additions and 67 deletions

View file

@ -1,22 +1,26 @@
{
"id": "cluster_style",
"description": "The style for the clustering in all themes.",
"description": "The style for the clustering in all themes. Enable `debug=true` to peak into clustered tiles",
"source": {
"osmTags": "tileId~*"
},
"title": "Clustered data",
"tagRenderings": [
"all_tags"
],
"color": {
"render": "#3c3",
"mappings": [
{
"if": "count>200",
"if": "showCount>200",
"then": "#f33"
},
{
"if": "count>100",
"if": "showCount>100",
"then": "#c93"
},
{
"if": "count>50",
"if": "showCount>50",
"then": "#cc3"
}
]
@ -25,10 +29,10 @@
"render": "1"
},
"label": {
"render": "<div class='rounded-full text-xl font-bold' style='width: 2rem; height: 2rem; background: white'>{count}</div>",
"render": "<div class='rounded-full text-xl font-bold' style='width: 2rem; height: 2rem; background: white'>{showCount}</div>",
"mappings": [
{
"if": "count>1000",
"if": "showCount>1000",
"then": "<div class='rounded-full text-xl font-bold flex flex-col' style='width: 2.5rem; height: 2.5rem; background: white'>{kilocount}K</div>"
}
]