gis-leaflet-helper 2.1.5 → 2.1.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.
@@ -8469,8 +8469,8 @@ var StatusBar = leafletSrc$1.exports.Control.extend({
8469
8469
  });
8470
8470
  }
8471
8471
  });
8472
- var EagleMap = L.Control.extend({
8473
- includes: L.Evented ? L.Evented.prototype : L.Mixin.Events,
8472
+ var EagleMap = leafletSrc$1.exports.Control.extend({
8473
+ includes: leafletSrc$1.exports.Evented ? leafletSrc$1.exports.Evented.prototype : leafletSrc$1.exports.Mixin.Events,
8474
8474
  options: {
8475
8475
  position: "bottomright",
8476
8476
  toggleDisplay: true,
@@ -8489,7 +8489,7 @@ var EagleMap = L.Control.extend({
8489
8489
  mapOptions: {}
8490
8490
  },
8491
8491
  initialize(layer2, options) {
8492
- L.Util.setOptions(this, options);
8492
+ leafletSrc$1.exports.Util.setOptions(this, options);
8493
8493
  this.options.aimingRectOptions.interactive = false;
8494
8494
  this.options.shadowRectOptions.interactive = false;
8495
8495
  this._layer = layer2;
@@ -8498,12 +8498,12 @@ var EagleMap = L.Control.extend({
8498
8498
  var _a, _b;
8499
8499
  this._mainMap = map;
8500
8500
  this.lang = (_b = (_a = map.options.lang) != null ? _a : this.options.lang) != null ? _b : "zh_CN";
8501
- this.langDic = _L.LANG[this.lang];
8502
- this._container = L.DomUtil.create("div", "leaflet-control-eaglemap");
8501
+ this.langDic = LANG[this.lang];
8502
+ this._container = leafletSrc$1.exports.DomUtil.create("div", "leaflet-control-eaglemap");
8503
8503
  this._container.style.width = this.options.width + "px";
8504
8504
  this._container.style.height = this.options.height + "px";
8505
- L.DomEvent.disableClickPropagation(this._container);
8506
- L.DomEvent.on(this._container, "mousewheel", L.DomEvent.stopPropagation);
8505
+ leafletSrc$1.exports.DomEvent.disableClickPropagation(this._container);
8506
+ leafletSrc$1.exports.DomEvent.on(this._container, "mousewheel", leafletSrc$1.exports.DomEvent.stopPropagation);
8507
8507
  let mapOptions = {
8508
8508
  attributionControl: false,
8509
8509
  dragging: !this.options.centerFixed,
@@ -8516,9 +8516,9 @@ var EagleMap = L.Control.extend({
8516
8516
  boxZoom: !this._isZoomLevelFixed(),
8517
8517
  crs: map.options.crs
8518
8518
  };
8519
- mapOptions = L.Util.extend(this.options.mapOptions, mapOptions);
8520
- this._eagleMap = new L.Map(this._container, mapOptions);
8521
- this._layer instanceof L.Layer && this._eagleMap.addLayer(this._layer);
8519
+ mapOptions = leafletSrc$1.exports.Util.extend(this.options.mapOptions, mapOptions);
8520
+ this._eagleMap = new leafletSrc$1.exports.Map(this._container, mapOptions);
8521
+ this._layer instanceof leafletSrc$1.exports.Layer && this._eagleMap.addLayer(this._layer);
8522
8522
  this._mainMapMoving = false;
8523
8523
  this._eagleMapMoving = false;
8524
8524
  this._userToggledDisplay = false;
@@ -8527,9 +8527,9 @@ var EagleMap = L.Control.extend({
8527
8527
  this._addToggleButton();
8528
8528
  }
8529
8529
  this._eagleMap.whenReady(
8530
- L.Util.bind(function() {
8531
- this._aimingRect = L.rectangle(this._mainMap.getBounds(), this.options.aimingRectOptions).addTo(this._eagleMap);
8532
- this._shadowRect = L.rectangle(this._mainMap.getBounds(), this.options.shadowRectOptions).addTo(this._eagleMap);
8530
+ leafletSrc$1.exports.Util.bind(function() {
8531
+ this._aimingRect = new leafletSrc$1.exports.Rectangle(this._mainMap.getBounds(), this.options.aimingRectOptions).addTo(this._eagleMap);
8532
+ this._shadowRect = new leafletSrc$1.exports.Rectangle(this._mainMap.getBounds(), this.options.shadowRectOptions).addTo(this._eagleMap);
8533
8533
  this._mainMap.on("moveend", this._onMainMapMoved, this);
8534
8534
  this._mainMap.on("move", this._onMainMapMoving, this);
8535
8535
  this._eagleMap.on("movestart", this._onEagleMapMoveStarted, this);
@@ -8540,7 +8540,7 @@ var EagleMap = L.Control.extend({
8540
8540
  return this._container;
8541
8541
  },
8542
8542
  addTo(map) {
8543
- L.Control.prototype.addTo.call(this, map);
8543
+ leafletSrc$1.exports.Control.prototype.addTo.call(this, map);
8544
8544
  const center = this.options.centerFixed || this._mainMap.getCenter();
8545
8545
  this._eagleMap.setView(center, this._decideZoom(true));
8546
8546
  this._setDisplay(this.options.minimized);
@@ -8577,12 +8577,12 @@ var EagleMap = L.Control.extend({
8577
8577
  }
8578
8578
  },
8579
8579
  _createButton(html, title, className, container, fn, context) {
8580
- const link2 = L.DomUtil.create("a", className, container);
8580
+ const link2 = leafletSrc$1.exports.DomUtil.create("a", className, container);
8581
8581
  link2.innerHTML = html;
8582
8582
  link2.href = "#";
8583
8583
  link2.title = title;
8584
- const stop = L.DomEvent.stopPropagation;
8585
- L.DomEvent.on(link2, "click", stop).on(link2, "mousedown", stop).on(link2, "dblclick", stop).on(link2, "click", L.DomEvent.preventDefault).on(link2, "click", fn, context);
8584
+ const stop = leafletSrc$1.exports.DomEvent.stopPropagation;
8585
+ leafletSrc$1.exports.DomEvent.on(link2, "click", stop).on(link2, "mousedown", stop).on(link2, "dblclick", stop).on(link2, "click", leafletSrc$1.exports.DomEvent.preventDefault).on(link2, "click", fn, context);
8586
8586
  return link2;
8587
8587
  },
8588
8588
  _toggleDisplayButtonClicked() {
@@ -8652,10 +8652,7 @@ var EagleMap = L.Control.extend({
8652
8652
  if (!this.options.centerFixed) {
8653
8653
  if (!this._mainMapMoving && this._lastAimingRectPosition) {
8654
8654
  this._shadowRect.setBounds(
8655
- new L.LatLngBounds(
8656
- this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.sw),
8657
- this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.ne)
8658
- )
8655
+ new leafletSrc$1.exports.LatLngBounds(this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.sw), this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.ne))
8659
8656
  );
8660
8657
  this._shadowRect.setStyle({ opacity: 1, fillOpacity: 0.3 });
8661
8658
  }
@@ -8722,15 +8719,15 @@ var EagleMap = L.Control.extend({
8722
8719
  return typeof value !== "undefined";
8723
8720
  },
8724
8721
  _onToggle() {
8725
- L.Util.requestAnimFrame(function() {
8726
- L.DomEvent.on(this._container, "transitionend", this._fireToggleEvents, this);
8727
- if (!L.Browser.any3d) {
8728
- L.Util.requestAnimFrame(this._fireToggleEvents, this);
8722
+ leafletSrc$1.exports.Util.requestAnimFrame(function() {
8723
+ leafletSrc$1.exports.DomEvent.on(this._container, "transitionend", this._fireToggleEvents, this);
8724
+ if (!leafletSrc$1.exports.Browser.any3d) {
8725
+ leafletSrc$1.exports.Util.requestAnimFrame(this._fireToggleEvents, this);
8729
8726
  }
8730
8727
  }, this);
8731
8728
  },
8732
8729
  _fireToggleEvents() {
8733
- L.DomEvent.off(this._container, "transitionend", this._fireToggleEvents, this);
8730
+ leafletSrc$1.exports.DomEvent.off(this._container, "transitionend", this._fireToggleEvents, this);
8734
8731
  const data = { minimized: this._minimized };
8735
8732
  this.fire(this._minimized ? "minimize" : "restore", data);
8736
8733
  this.fire("toggle", data);
@@ -17577,9 +17574,9 @@ function injectCss(cls) {
17577
17574
  doc.appendChild(myStyle);
17578
17575
  }
17579
17576
  ((_this) => {
17580
- const _L2 = Object.create(L$1) || {};
17581
- _L2.LANG = LANG;
17582
- _L2.BaseMap = leafletSrc$1.exports.Map.extend({
17577
+ const _L = Object.create(L$1) || {};
17578
+ _L.LANG = LANG;
17579
+ _L.BaseMap = leafletSrc$1.exports.Map.extend({
17583
17580
  options: {
17584
17581
  doubleClickZoom: false,
17585
17582
  closePopupOnClick: false,
@@ -17621,10 +17618,10 @@ function injectCss(cls) {
17621
17618
  return opt.debug.allowDevtool;
17622
17619
  };
17623
17620
  } else {
17624
- document.onkeydown = function(t) {
17621
+ process.env["NODE_ENV"] !== "development" && (document.onkeydown = function(t) {
17625
17622
  if (t && t.keyCode === 123)
17626
17623
  return false;
17627
- }, el.oncontextmenu = () => false;
17624
+ }), el.oncontextmenu = () => false;
17628
17625
  }
17629
17626
  _this[name || "$m"] = this;
17630
17627
  },
@@ -17647,17 +17644,17 @@ function injectCss(cls) {
17647
17644
  }
17648
17645
  }
17649
17646
  });
17650
- _L2.StatusBar = StatusBar;
17651
- _L2.CRS.BaiDu = BaiDu;
17652
- _L2.WebMercatorTiledLayer = WebMercatorTiledLayer;
17653
- _L2.Knob = Knob;
17654
- _L2.EagleMap = EagleMap;
17655
- _L2.LayerManager = LayerManager;
17656
- _L2.ImageOverlay.Rotated = RotatedImageOverLayer;
17657
- _L2.Text = TextLayer;
17658
- _L2.VertexMarkers = VertexMarker;
17659
- _L2.Measurement = MeasureMent;
17660
- return _this.L = _L2;
17647
+ _L.StatusBar = StatusBar;
17648
+ _L.CRS.BaiDu = BaiDu;
17649
+ _L.WebMercatorTiledLayer = WebMercatorTiledLayer;
17650
+ _L.Knob = Knob;
17651
+ _L.EagleMap = EagleMap;
17652
+ _L.LayerManager = LayerManager;
17653
+ _L.ImageOverlay.Rotated = RotatedImageOverLayer;
17654
+ _L.Text = TextLayer;
17655
+ _L.VertexMarkers = VertexMarker;
17656
+ _L.Measurement = MeasureMent;
17657
+ return _this.L = _L;
17661
17658
  })(globalThis || window);
17662
17659
  var initialize = "";
17663
17660
  var main = "";