my-openlayer 0.1.9 → 0.1.10
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/core/Line.js +3 -1
- package/dist/core/MapTools.js +4 -4
- package/package.json +1 -1
package/dist/core/Line.js
CHANGED
|
@@ -22,7 +22,9 @@ export default class Line {
|
|
|
22
22
|
return new Style({
|
|
23
23
|
stroke: new Stroke({
|
|
24
24
|
color: options.strokeColor || 'rgba(3, 122, 255, 1)',
|
|
25
|
-
width: options.strokeWidth || 2
|
|
25
|
+
width: options.strokeWidth || 2,
|
|
26
|
+
lineDash: options?.lineDash,
|
|
27
|
+
lineDashOffset: options?.lineDashOffset
|
|
26
28
|
}),
|
|
27
29
|
});
|
|
28
30
|
},
|
package/dist/core/MapTools.js
CHANGED
|
@@ -20,16 +20,16 @@ class MapTools {
|
|
|
20
20
|
static getLayerByLayerName(map, layerName) {
|
|
21
21
|
const targetLayer = [];
|
|
22
22
|
const layers = map.getLayers().getArray();
|
|
23
|
-
Object.
|
|
24
|
-
const _layerName =
|
|
23
|
+
Object.values(layers).forEach((layer) => {
|
|
24
|
+
const _layerName = layer.get('layerName');
|
|
25
25
|
if (typeof layerName === "string") {
|
|
26
26
|
if (_layerName && _layerName === layerName) {
|
|
27
|
-
targetLayer.push(
|
|
27
|
+
targetLayer.push(layer);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
31
|
if (_layerName && layerName.includes(_layerName)) {
|
|
32
|
-
targetLayer.push(
|
|
32
|
+
targetLayer.push(layer);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
});
|