gis-common 4.2.1 → 4.2.2
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/constant/GraphicConstant.d.ts +6 -0
- package/dist/core/AudioPlayer.d.ts +16 -0
- package/dist/core/Cookie.d.ts +5 -0
- package/dist/core/MqttClient.d.ts +3 -3
- package/dist/core/Storage.d.ts +28 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/gis-common.es.js +1912 -1076
- package/dist/gis-common.umd.js +1 -1
- package/dist/utils/AjaxUtil.d.ts +7 -7
- package/dist/utils/ArrayUtil.d.ts +2 -2
- package/dist/utils/CommUtil.d.ts +22 -0
- package/dist/utils/MathUtil.d.ts +6 -29
- package/dist/utils/OptimizeUtil.d.ts +7 -0
- package/dist/utils/StringUtil.d.ts +0 -8
- package/dist/utils/index.d.ts +0 -2
- package/package.json +2 -1
- package/dist/utils/Cookie.d.ts +0 -6
- package/dist/utils/StoreUtil.d.ts +0 -10
|
@@ -9,6 +9,12 @@ export declare enum GraphicType {
|
|
|
9
9
|
MODEL = "model",
|
|
10
10
|
WALL = "wall"
|
|
11
11
|
}
|
|
12
|
+
export declare enum LineSymbol {
|
|
13
|
+
DASH = "10,5",
|
|
14
|
+
DOT = "3",
|
|
15
|
+
DASHDOT = "10,3,3,3",
|
|
16
|
+
DASHDOTDOT = "10,3,3,3,3,3"
|
|
17
|
+
}
|
|
12
18
|
export declare enum MeasureMode {
|
|
13
19
|
DISTANCE = "distance",
|
|
14
20
|
AREA = "area",
|
|
@@ -9,6 +9,22 @@ export default class AudioPlayer {
|
|
|
9
9
|
* @param {*} url
|
|
10
10
|
*/
|
|
11
11
|
private audio;
|
|
12
|
+
/**
|
|
13
|
+
* 朗读文本
|
|
14
|
+
*
|
|
15
|
+
* @param message 要朗读的文本内容
|
|
16
|
+
* @param options 朗读选项,可选参数包括:
|
|
17
|
+
* - lang: 使用的语言,默认为中文
|
|
18
|
+
* - volume: 声音音量,默认为1
|
|
19
|
+
* - rate: 语速,默认为1
|
|
20
|
+
* - pitch: 音高,默认为1
|
|
21
|
+
*/
|
|
22
|
+
static speak(message: string, options?: {
|
|
23
|
+
lang?: string;
|
|
24
|
+
volume?: number;
|
|
25
|
+
rate?: number;
|
|
26
|
+
pitch?: number;
|
|
27
|
+
}): void;
|
|
12
28
|
constructor(url: string);
|
|
13
29
|
play(): void;
|
|
14
30
|
pause(): void;
|
|
@@ -7,7 +7,6 @@ declare enum State {
|
|
|
7
7
|
type MqttContext = {
|
|
8
8
|
MQTT_USERNAME: string;
|
|
9
9
|
MQTT_PASSWORD: string;
|
|
10
|
-
MQTT_SERVICE: string;
|
|
11
10
|
MQTT_TIMEOUTM?: number;
|
|
12
11
|
};
|
|
13
12
|
export default class MqttClient extends EventDispatcher {
|
|
@@ -17,15 +16,16 @@ export default class MqttClient extends EventDispatcher {
|
|
|
17
16
|
*/
|
|
18
17
|
private static defaultContext;
|
|
19
18
|
state: State;
|
|
19
|
+
url: string;
|
|
20
20
|
context: MqttContext;
|
|
21
21
|
options: any;
|
|
22
22
|
client: any;
|
|
23
23
|
topics: string[];
|
|
24
|
-
constructor(config?: {});
|
|
24
|
+
constructor(url?: string, config?: {});
|
|
25
25
|
_onConnect(): void;
|
|
26
26
|
_onMessage(): void;
|
|
27
27
|
sendMsg(topic: string, msg: string): void;
|
|
28
|
-
subscribe(topic:
|
|
28
|
+
subscribe(topic: any | string[]): this;
|
|
29
29
|
unsubscribe(topic: string | string[]): this;
|
|
30
30
|
unsubscribeAll(): void;
|
|
31
31
|
unconnect(): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default class Storage {
|
|
2
|
+
static prefix: string;
|
|
3
|
+
private static _getPrefixedKey;
|
|
4
|
+
/**
|
|
5
|
+
* 将键值对存储到localStorage中
|
|
6
|
+
*
|
|
7
|
+
* @param key 键名
|
|
8
|
+
* @param value 值,默认为null
|
|
9
|
+
* @param options 存储选项,可选参数
|
|
10
|
+
* @param options.expires 过期时间,单位为毫秒,默认为null
|
|
11
|
+
*/
|
|
12
|
+
static set(key: string, value?: any, options?: {
|
|
13
|
+
expires?: number;
|
|
14
|
+
}): void;
|
|
15
|
+
/**
|
|
16
|
+
* 从localStorage中获取指定key的存储值
|
|
17
|
+
*
|
|
18
|
+
* @param key 存储键名
|
|
19
|
+
* @param missing 当获取不到指定key的存储值时返回的默认值
|
|
20
|
+
* @param options 其他配置选项
|
|
21
|
+
* @returns 返回指定key的存储值,若获取不到则返回missing参数指定的默认值
|
|
22
|
+
*/
|
|
23
|
+
static get(key: string, missing: any, options: any): any;
|
|
24
|
+
static keys(): string[];
|
|
25
|
+
static getAll(includeKeys: string[] | undefined): any[];
|
|
26
|
+
static remove(key: string, options: any): void;
|
|
27
|
+
static clear(options: any): void;
|
|
28
|
+
}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { default as AudioPlayer } from './AudioPlayer';
|
|
2
|
+
export { default as Cookie } from './Cookie';
|
|
2
3
|
export { default as CanvasDrawer } from './CanvasDrawer';
|
|
3
4
|
export { default as EventDispatcher } from './EventDispatcher';
|
|
4
5
|
export { default as HashMap } from './HashMap';
|
|
5
6
|
export { default as WebSocketClient } from './WebSocketClient';
|
|
6
7
|
export { default as MqttClient } from './MqttClient';
|
|
8
|
+
export { default as Storage } from './Storage';
|