diff --git a/lib/ui/layers/legends/categorized.mjs b/lib/ui/layers/legends/categorized.mjs index cde34fc062..33a04e901c 100644 --- a/lib/ui/layers/legends/categorized.mjs +++ b/lib/ui/layers/legends/categorized.mjs @@ -59,7 +59,7 @@ export default (layer) => { let classList = `label ${layer.filter && 'switch' ||''} ${cat.disabled && 'disabled' ||''}`; - let cat_label = (cat.label || cat.value) + (cat.count? ` [${cat.count}]`:'') + let cat_label = cat.label + (cat.count? ` [${cat.count}]`:'') // Cat label with filter function. let label = mapp.utils.html` diff --git a/lib/ui/locations/entries/mvt_clone.mjs b/lib/ui/locations/entries/mvt_clone.mjs index a384651558..e85e262c8d 100644 --- a/lib/ui/locations/entries/mvt_clone.mjs +++ b/lib/ui/locations/entries/mvt_clone.mjs @@ -30,6 +30,9 @@ export default entry => { entry.style.default = {...entry.location?.style, ...entry.style.default} } + // Update entry.style config. + mapp.layer.styleParser(entry) + // Create clone VectorTile layer. entry.L = new ol.layer.VectorTile({ source: entry.Layer.L.getSource(), diff --git a/lib/ui/locations/entries/vector_layer.mjs b/lib/ui/locations/entries/vector_layer.mjs index 1e46fd761b..41df68d9f3 100644 --- a/lib/ui/locations/entries/vector_layer.mjs +++ b/lib/ui/locations/entries/vector_layer.mjs @@ -21,6 +21,9 @@ export default entry => { entry.style.default = {...entry.location?.style, ...entry.style.default} } + // Update entry.style config. + mapp.layer.styleParser(entry) + // Create checkbox to control geometry display. const chkbox = mapp.ui.elements.chkbox({ label: entry.label || 'MVT Clone',