@aibee/crc-bmap 0.0.14 → 0.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/example/src/main.ts +5 -5
- package/lib/bmap.cjs.min.js +2 -2
- package/lib/bmap.cjs.min.js.map +3 -3
- package/lib/bmap.esm.js +56 -11
- package/lib/bmap.esm.js.map +2 -2
- package/lib/bmap.esm.min.js +2 -2
- package/lib/bmap.esm.min.js.map +3 -3
- package/lib/bmap.min.js +2 -2
- package/lib/bmap.min.js.map +3 -3
- package/lib/src/bmap.d.ts +7 -1
- package/lib/src/layer/graphic-layer.d.ts +1 -0
- package/lib/src/types/index.d.ts +13 -6
- package/package.json +1 -1
package/lib/src/bmap.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventDispatcher, Object3D } from "three";
|
|
2
2
|
import { Context } from "./context";
|
|
3
3
|
import { Config } from './config';
|
|
4
|
-
import { Graphic, HeatmapDataParam, PoiOptionsParam } from "./elements";
|
|
4
|
+
import { Graphic, GraphicOptionsParam, HeatmapDataParam, PoiOptionsParam } from "./elements";
|
|
5
5
|
import { GraphicInfo } from "./types";
|
|
6
6
|
export interface LoadQuery {
|
|
7
7
|
brand: string;
|
|
@@ -97,5 +97,11 @@ export declare class BMap extends EventDispatcher {
|
|
|
97
97
|
* 取消测量面积
|
|
98
98
|
*/
|
|
99
99
|
cancelArea(): void;
|
|
100
|
+
/**
|
|
101
|
+
* 根据nodeId 获取graphic
|
|
102
|
+
*/
|
|
103
|
+
getGraphicByNodeId(nodeId: string): Graphic | null;
|
|
104
|
+
deleteGraphic(graphic: Graphic): void;
|
|
105
|
+
createGraphicByOptions(options: GraphicOptionsParam): Graphic | undefined;
|
|
100
106
|
dispose(): void;
|
|
101
107
|
}
|
|
@@ -3,6 +3,7 @@ import { Raycaster, Vector3 } from "three";
|
|
|
3
3
|
import { Layer } from "./layer";
|
|
4
4
|
import { Context } from "../context";
|
|
5
5
|
export declare class GraphicLayer extends Layer {
|
|
6
|
+
graphicMap: Map<string, Graphic>;
|
|
6
7
|
constructor(context: Context);
|
|
7
8
|
getCenter(): Vector3;
|
|
8
9
|
createGraphic(options: GraphicOptionsParam): Graphic;
|
package/lib/src/types/index.d.ts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
export type Coordinate = [number, number];
|
|
2
|
+
export interface PointGeometry {
|
|
3
|
+
type: "point";
|
|
4
|
+
cds: Coordinate;
|
|
5
|
+
curveCpt: Coordinate[];
|
|
6
|
+
curveIndex: [];
|
|
7
|
+
}
|
|
8
|
+
export interface PolygonGeometry {
|
|
9
|
+
type: "polygon";
|
|
10
|
+
cds: Coordinate[][];
|
|
11
|
+
curveCpt: Coordinate[];
|
|
12
|
+
curveIndex: [];
|
|
13
|
+
}
|
|
2
14
|
export interface GraphicOptions {
|
|
3
15
|
id: string;
|
|
4
16
|
height: number;
|
|
@@ -12,12 +24,7 @@ export interface GraphicOptions {
|
|
|
12
24
|
locked: boolean;
|
|
13
25
|
visible: boolean;
|
|
14
26
|
doors: any[];
|
|
15
|
-
geometry:
|
|
16
|
-
type: "polygon" | "point";
|
|
17
|
-
cds: Coordinate[][];
|
|
18
|
-
curveCpt: Coordinate[];
|
|
19
|
-
curveIndex: [];
|
|
20
|
-
};
|
|
27
|
+
geometry: PolygonGeometry | PointGeometry;
|
|
21
28
|
layerType: string;
|
|
22
29
|
zIndex: number;
|
|
23
30
|
}
|