raintee-maputils 1.0.15 → 1.0.16

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.js CHANGED
@@ -1,4 +1,4 @@
1
- class CustomOptionsControl {
1
+ class OptionsControl {
2
2
  constructor(args) {
3
3
  const { options, onConfirm } = args;
4
4
 
@@ -165,7 +165,12 @@ class CustomOptionsControl {
165
165
  this._container.parentNode.removeChild(this._container);
166
166
  }
167
167
  }
168
- }
168
+ }
169
+ const CustomOptionsControlBuilder = {
170
+ build(args) {
171
+ return new OptionsControl(args);
172
+ }
173
+ };
169
174
 
170
175
  // 自定义控件类:ToggleControl
171
176
  class ToggleControl {
@@ -291,7 +296,12 @@ class ToggleControl {
291
296
  // ✅ 调用回调函数(如果传入了 onToggle),并传入最新的值
292
297
  this.onToggle?.(newValue); // 安全调用,仅当函数存在时才执行
293
298
  }
294
- }
299
+ }
300
+ const CustomToggleControlBuilder = {
301
+ build(args) {
302
+ return new ToggleControl(args);
303
+ }
304
+ };
295
305
 
296
306
  const predefineColorSet = {
297
307
  '默认单色预设': [{
@@ -6115,7 +6125,7 @@ var RainteeSourceMapTool = /*#__PURE__*/Object.freeze({
6115
6125
 
6116
6126
  // RasterLayerController.js
6117
6127
 
6118
- class RasterLayerController {
6128
+ class RasterLayerControl {
6119
6129
  constructor() {
6120
6130
  this._panel = null;
6121
6131
  this._isOpen = false;
@@ -6372,7 +6382,12 @@ class RasterLayerController {
6372
6382
  this._layerListContainer && this._layerListContainer.appendChild(document.createTextNode('无可选内容'));
6373
6383
  }
6374
6384
  }
6375
- }
6385
+ }
6386
+ const RasterLayerControlBuilder = {
6387
+ build(args) {
6388
+ return new RasterLayerControl(args);
6389
+ }
6390
+ };
6376
6391
 
6377
6392
  // terrain-toggle-control.js
6378
6393
 
@@ -6499,7 +6514,12 @@ class TerrainToggleControl {
6499
6514
  this._map.off('styledata', _onStyleData);
6500
6515
  this._map = null;
6501
6516
  }
6502
- }
6517
+ }
6518
+ const TerrainToggleControlBuilder = {
6519
+ build(args) {
6520
+ return new TerrainToggleControl(args);
6521
+ }
6522
+ };
6503
6523
 
6504
6524
  const taskQueue = [];
6505
6525
  const addTask = (task) => {
@@ -6562,5 +6582,5 @@ const useDrawCache = () => {
6562
6582
  }
6563
6583
  };
6564
6584
 
6565
- export { CustomOptionsControl, ToggleControl as CustomToggleControl, RainteeConstants, RainteeGISUtil, RainteeSourceMapTool, RasterLayerController, TerrainToggleControl, useDrawCache };
6585
+ export { CustomOptionsControlBuilder, CustomToggleControlBuilder, RainteeConstants, RainteeGISUtil, RainteeSourceMapTool, RasterLayerControlBuilder, TerrainToggleControlBuilder, useDrawCache };
6566
6586
  //# sourceMappingURL=index.js.map