{
if (map.getLayer(`statistics`)) {
map.removeLayer(`statistics`);
map.removeSource(`statistics`);
}
map.addLayer(
{
id: `statistics`,
type: "fill",
source: {
type: "vector",
tiles: [
`https://api.targomo.com/statistics/collections/tiles/79/{z}/{x}/{y}.mvt?columns=${
statistic.statistic_id
}&apiKey=${targomoKey()}&serviceUrl=https://api.targomo.com/westcentraleurope`
]
},
"source-layer": "statistics",
layout: {},
paint: {
"fill-opacity": 0.55,
"fill-color": "rgba(255,255,255,0)",
"fill-outline-color": "rgba(255,255,255,0)"
}
},
"place_other"
);
mutable styletrigger = new Date();
return md`_update tile mvt url if statistic is changed_`;
}