gis-leaflet-helper 3.3.13 → 3.3.14
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.
|
@@ -27028,7 +27028,7 @@ const PlotDraw = leafletSrcExports.Handler.extend({
|
|
|
27028
27028
|
this.type = void 0;
|
|
27029
27029
|
this._map._container.style.cursor = "default";
|
|
27030
27030
|
this.latlngs = [];
|
|
27031
|
-
this._map.closeTooltip(this.tooltip);
|
|
27031
|
+
this.tooltip && this._map.closeTooltip(this.tooltip);
|
|
27032
27032
|
L.Handler.prototype.disable.call(this);
|
|
27033
27033
|
}
|
|
27034
27034
|
});
|
|
@@ -31967,9 +31967,9 @@ function injectCss(cls) {
|
|
|
31967
31967
|
setBackground: function(background) {
|
|
31968
31968
|
const container = this.getContainer();
|
|
31969
31969
|
if (Color.isColor(background)) {
|
|
31970
|
-
container.style.
|
|
31970
|
+
container.style.background = background;
|
|
31971
31971
|
} else {
|
|
31972
|
-
container.style.background = `url(${background}), no-repeat center center / cover
|
|
31972
|
+
container.style.background = background ? `url(${background}), no-repeat center center / cover` : "inherit";
|
|
31973
31973
|
}
|
|
31974
31974
|
},
|
|
31975
31975
|
flyTo(target, zoom = 0, options = { animate: false }) {
|
|
@@ -31995,6 +31995,17 @@ function injectCss(cls) {
|
|
|
31995
31995
|
visible ? layer.addTo(this) : layer.remove();
|
|
31996
31996
|
}
|
|
31997
31997
|
},
|
|
31998
|
+
getScaleDistance() {
|
|
31999
|
+
var centerX = this.getSize().x / 2;
|
|
32000
|
+
var centerY = this.getSize().y / 2;
|
|
32001
|
+
var pixelsPerCm = 96 / 2.54;
|
|
32002
|
+
var point1 = L.point(centerX - pixelsPerCm / 2, centerY);
|
|
32003
|
+
var point2 = L.point(centerX + pixelsPerCm / 2, centerY);
|
|
32004
|
+
var latLng1 = this.containerPointToLatLng(point1);
|
|
32005
|
+
var latLng2 = this.containerPointToLatLng(point2);
|
|
32006
|
+
var realDistanceMeters = this.distance(latLng1, latLng2);
|
|
32007
|
+
return realDistanceMeters;
|
|
32008
|
+
},
|
|
31998
32009
|
openWidget(name, options = {}, events = {}, config = {}) {
|
|
31999
32010
|
this.fire("widget-mount", {
|
|
32000
32011
|
name,
|