maplibre-gl-layer-control-tidop 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -929,7 +929,6 @@ class LayerControl {
|
|
|
929
929
|
const layerType = layer.type;
|
|
930
930
|
const opacity = getLayerOpacity(this.map, layerId, layerType);
|
|
931
931
|
const friendlyName = this.generateFriendlyName(layerId);
|
|
932
|
-
console.log(layer);
|
|
933
932
|
this.state.layerStates[layerId] = {
|
|
934
933
|
visible: isVisible,
|
|
935
934
|
opacity,
|
|
@@ -965,7 +964,6 @@ class LayerControl {
|
|
|
965
964
|
const layerType = layer.type;
|
|
966
965
|
const opacity = getLayerOpacity(this.map, layerId, layerType);
|
|
967
966
|
const friendlyName = this.generateFriendlyName(layerId);
|
|
968
|
-
console.log(layer);
|
|
969
967
|
this.state.layerStates[layerId] = {
|
|
970
968
|
visible: isVisible,
|
|
971
969
|
opacity,
|
|
@@ -1089,7 +1087,7 @@ class LayerControl {
|
|
|
1089
1087
|
let name = layerId.replace(/^(layer[-_]?|gl[-_]?)/, "");
|
|
1090
1088
|
name = name.replace(/[-_]/g, " ");
|
|
1091
1089
|
name = name.replace(/\b\w/g, (char) => char.toUpperCase());
|
|
1092
|
-
return
|
|
1090
|
+
return layerId;
|
|
1093
1091
|
}
|
|
1094
1092
|
/**
|
|
1095
1093
|
* Check if a layer ID belongs to a drawing library (Geoman, Mapbox GL Draw, etc.)
|
|
@@ -3457,7 +3455,7 @@ class LayerControl {
|
|
|
3457
3455
|
uiLayerIds.push(layerId);
|
|
3458
3456
|
}
|
|
3459
3457
|
});
|
|
3460
|
-
const reversedIds = [...uiLayerIds].reverse();
|
|
3458
|
+
const reversedIds = [...uiLayerIds].reverse().reverse();
|
|
3461
3459
|
const style = this.map.getStyle();
|
|
3462
3460
|
const mapLibreLayerIds = new Set(((_a = style == null ? void 0 : style.layers) == null ? void 0 : _a.map((l) => l.id)) || []);
|
|
3463
3461
|
for (let i = 0; i < reversedIds.length; i++) {
|