gis-leaflet-helper 3.3.15 → 3.3.17

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.
@@ -26663,7 +26663,7 @@ const RadarCircle = L.LayerGroup.extend({
26663
26663
  });
26664
26664
  L.LayerGroup.prototype.addLayer.call(this, circle);
26665
26665
  const bounds = circle.getBounds();
26666
- const label = this.labelCircleEntity[i - 1] = new L.Text(L.latLng(this.latLng.lat, bounds.getEast()), MathUtil.formatLength(radius), {
26666
+ const label = this.labelCircleEntity[i - 1] = new L.Text(L.latLng(this.latLng.lat, bounds.getEast()), MathUtil.formatDistance(radius), {
26667
26667
  color: this.options.scale.labelColor,
26668
26668
  offset: [24, 16],
26669
26669
  minZoom: this.options.scale.minZoom,
@@ -29926,6 +29926,13 @@ const PolylineDecorator = L.FeatureGroup.extend({
29926
29926
  });
29927
29927
  }
29928
29928
  });
29929
+ const LineSymbol = {
29930
+ SOLID: null,
29931
+ DASH: "10,5",
29932
+ DOT: "3",
29933
+ DASHDOT: "10,3,3,3",
29934
+ DASHDOTDOT: "10,3,3,3,3,3"
29935
+ };
29929
29936
  const Dash = L.Class.extend({
29930
29937
  options: {
29931
29938
  pixelSize: 10,
@@ -29994,7 +30001,7 @@ const Marker = L.Class.extend({
29994
30001
  return L.marker(directionPoint.latLng, this.options.markerOptions);
29995
30002
  }
29996
30003
  });
29997
- const Symbol$1 = { Dash, ArrowHead, Marker };
30004
+ const Symbol$1 = { Dash, ArrowHead, Marker, LineSymbol };
29998
30005
  const Draw = leafletSrcExports.Handler.extend({
29999
30006
  options: {
30000
30007
  color: "#f00",
@@ -31989,10 +31996,10 @@ function injectCss(cls) {
31989
31996
  getLayers() {
31990
31997
  return Object.values(this._layers);
31991
31998
  },
31992
- setLayerVisible(id, visible) {
31993
- const layer = this.layerMap.get(id);
31994
- if (layer && (visible === true || visible === false)) {
31995
- visible ? layer.addTo(this) : layer.remove();
31999
+ setLayerVisible(layer, visible) {
32000
+ const _layer = typeof layer === "string" ? this.layerMap.get(layer) : this.layerMap.get(layer._leaflet_id);
32001
+ if (_layer && (visible === true || visible === false)) {
32002
+ visible ? _layer.addTo(this) : _layer.remove();
31996
32003
  }
31997
32004
  },
31998
32005
  getScaleDistance() {