@antv/l7-scene 2.17.7 → 2.17.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/es/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Bounds, ICameraOptions, IControl, IDebugService, IIconFontGlyph, IImage, ILayer, ILngLat, IMapService, IMarker, IMarkerLayer, IPoint, IPopup, IPostProcessingPass, ISceneConfig, IStatusOptions, Point } from '@antv/l7-core';
2
+ import { IProtocolHandler } from '@antv/l7-utils';
2
3
  import { Container } from 'inversify';
3
4
  import ILayerManager from './ILayerManager';
4
5
  import IMapController from './IMapController';
@@ -118,6 +119,9 @@ declare class Scene implements IPostProcessingPassPluggable, IMapController, ILa
118
119
  diasbleShaderPick(): void;
119
120
  enableBoxSelect(once?: boolean): void;
120
121
  disableBoxSelect(): void;
122
+ static addProtocol(protocol: string, handler: IProtocolHandler): void;
123
+ static removeProtocol(protocol: string): void;
124
+ getProtocol(protocol: string): IProtocolHandler;
121
125
  getPointSizeRange(): Float32Array;
122
126
  private initComponent;
123
127
  private initControl;
package/es/index.js CHANGED
@@ -8,7 +8,7 @@ import { Logo } from '@antv/l7-component';
8
8
  import { createLayerContainer, createSceneContainer, SceneEventList, TYPES } from '@antv/l7-core';
9
9
  import { MaskLayer } from '@antv/l7-layers';
10
10
  import { ReglRendererService } from '@antv/l7-renderer';
11
- import { DOM, isMini, setMiniScene } from '@antv/l7-utils';
11
+ import { DOM, isMini, SceneConifg, setMiniScene } from '@antv/l7-utils';
12
12
  import BoxSelect, { BoxSelectEventList } from "./boxSelect";
13
13
  /**
14
14
  * 暴露 Scene API
@@ -648,6 +648,13 @@ var Scene = /*#__PURE__*/function () {
648
648
  this.boxSelect.disable();
649
649
  }
650
650
 
651
+ // 数据协议
652
+ }, {
653
+ key: "getProtocol",
654
+ value: function getProtocol(protocol) {
655
+ return SceneConifg.REGISTERED_PROTOCOLS[protocol];
656
+ }
657
+
651
658
  // get current point size info
652
659
  }, {
653
660
  key: "getPointSizeRange",
@@ -675,6 +682,16 @@ var Scene = /*#__PURE__*/function () {
675
682
  }));
676
683
  }
677
684
  }
685
+ }], [{
686
+ key: "addProtocol",
687
+ value: function addProtocol(protocol, handler) {
688
+ SceneConifg.REGISTERED_PROTOCOLS[protocol] = handler;
689
+ }
690
+ }, {
691
+ key: "removeProtocol",
692
+ value: function removeProtocol(protocol) {
693
+ delete SceneConifg.REGISTERED_PROTOCOLS[protocol];
694
+ }
678
695
  }]);
679
696
  return Scene;
680
697
  }();
package/lib/index.js CHANGED
@@ -407,6 +407,16 @@ var Scene = class {
407
407
  disableBoxSelect() {
408
408
  this.boxSelect.disable();
409
409
  }
410
+ // 数据协议
411
+ static addProtocol(protocol, handler) {
412
+ import_l7_utils.SceneConifg.REGISTERED_PROTOCOLS[protocol] = handler;
413
+ }
414
+ static removeProtocol(protocol) {
415
+ delete import_l7_utils.SceneConifg.REGISTERED_PROTOCOLS[protocol];
416
+ }
417
+ getProtocol(protocol) {
418
+ return import_l7_utils.SceneConifg.REGISTERED_PROTOCOLS[protocol];
419
+ }
410
420
  // get current point size info
411
421
  getPointSizeRange() {
412
422
  return this.sceneService.getPointSizeRange();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-scene",
3
- "version": "2.17.7",
3
+ "version": "2.17.10",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -23,12 +23,12 @@
23
23
  "author": "xiaoiver",
24
24
  "license": "ISC",
25
25
  "dependencies": {
26
- "@antv/l7-component": "2.17.7",
27
- "@antv/l7-core": "2.17.7",
28
- "@antv/l7-layers": "2.17.7",
29
- "@antv/l7-maps": "2.17.7",
30
- "@antv/l7-renderer": "2.17.7",
31
- "@antv/l7-utils": "2.17.7",
26
+ "@antv/l7-component": "2.17.10",
27
+ "@antv/l7-core": "2.17.10",
28
+ "@antv/l7-layers": "2.17.10",
29
+ "@antv/l7-maps": "2.17.10",
30
+ "@antv/l7-renderer": "2.17.10",
31
+ "@antv/l7-utils": "2.17.10",
32
32
  "@babel/runtime": "^7.7.7",
33
33
  "eventemitter3": "^4.0.7",
34
34
  "inversify": "^5.0.1",
@@ -36,9 +36,9 @@
36
36
  "reflect-metadata": "^0.1.13"
37
37
  },
38
38
  "devDependencies": {
39
- "@antv/l7-test-utils": "2.17.7"
39
+ "@antv/l7-test-utils": "2.17.10"
40
40
  },
41
- "gitHead": "dc2526087e7c2a42fb335c3faa257ede61734e44",
41
+ "gitHead": "58ed9272beb1b324082485e424d712d2890f23c7",
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  }