@sswroom/sswr 1.5.5 → 1.6.1
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/Changelog +27 -0
- package/cert.d.ts +411 -0
- package/cert.js +4616 -0
- package/certutil.d.ts +376 -0
- package/certutil.js +2692 -0
- package/cesium.d.ts +13 -13
- package/cesium.js +8 -4
- package/data.d.ts +54 -33
- package/data.js +200 -77
- package/geometry.d.ts +2 -2
- package/hash.d.ts +57 -0
- package/hash.js +269 -0
- package/hkoapi.d.ts +26 -26
- package/kml.d.ts +25 -17
- package/kml.js +24 -1
- package/leaflet.d.ts +7 -7
- package/leaflet.js +9 -5
- package/map.d.ts +17 -16
- package/math.d.ts +13 -13
- package/media.d.ts +10 -10
- package/media.js +3 -2
- package/net.d.ts +1 -0
- package/net.js +5 -0
- package/olayer2.d.ts +2 -2
- package/olayer2.js +8 -4
- package/package.json +1 -1
- package/parser.d.ts +8 -3
- package/parser.js +249 -9
- package/text.d.ts +10 -1
- package/text.js +284 -2
- package/unit.d.ts +2 -0
- package/unit.js +110 -0
- package/web.d.ts +1 -0
- package/web.js +17 -0
package/cesium.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Cartesian3, Ellipsoid, Viewer } from "cesium";
|
|
1
|
+
import { Cartesian3, Ellipsoid, Viewer, Color, PolygonGraphics } from "cesium";
|
|
2
2
|
import * as geometry from "./geometry";
|
|
3
3
|
import * as kml from "./kml";
|
|
4
4
|
import * as map from "./map";
|
|
5
|
-
import
|
|
5
|
+
import * as math from "./math";
|
|
6
6
|
|
|
7
7
|
declare class KMLFeatureOptions
|
|
8
8
|
{
|
|
9
9
|
noPopup: boolean;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export function screenToLatLon(viewer: Viewer, x: number, y: number, ellipsoid: Ellipsoid) : Coord2D;
|
|
12
|
+
export function screenToLatLon(viewer: Viewer, x: number, y: number, ellipsoid: Ellipsoid) : math.Coord2D;
|
|
13
13
|
export function fromCXYZArray(arr: any[]): Cartesian3[];
|
|
14
14
|
export function toCartesian3Arr(coords: number[][]) : Cartesian3[];
|
|
15
15
|
export function newObjFromGeoJSON(geoJSON: object) : object;
|
|
16
|
-
export function addGeoJSON(viewer: Viewer, geoJSON: object, color:
|
|
16
|
+
export function addGeoJSON(viewer: Viewer, geoJSON: object, color: Color, extSize: number): void;
|
|
17
17
|
export function fromCartesian3Array(viewer: Viewer, arr: Cartesian3[]): object[];
|
|
18
|
-
export function fromPolygonGraphics(viewer: Viewer, pg:
|
|
19
|
-
export function
|
|
20
|
-
export function createFromGeometry(geom: geometry.Vector2D, options: GeometryOptions)
|
|
18
|
+
export function fromPolygonGraphics(viewer: Viewer, pg: PolygonGraphics): geometry.Polygon;
|
|
19
|
+
export function createFromKML(feature: kml.Feature | kml.KMLFile, options: KMLFeatureOptions): any;
|
|
20
|
+
export function createFromGeometry(geom: geometry.Vector2D, options: map.GeometryOptions)
|
|
21
21
|
|
|
22
22
|
export class CesiumMap extends map.MapControl
|
|
23
23
|
{
|
|
24
24
|
constructor(divId: string);
|
|
25
|
-
createLayer(layer: map.LayerInfo, options?: LayerOptions): any;
|
|
26
|
-
createMarkerLayer(name: string, options?: LayerOptions): any;
|
|
27
|
-
createGeometryLayer(name: string, options?: LayerOptions): any;
|
|
25
|
+
createLayer(layer: map.LayerInfo, options?: map.LayerOptions): any;
|
|
26
|
+
createMarkerLayer(name: string, options?: map.LayerOptions): any;
|
|
27
|
+
createGeometryLayer(name: string, options?: map.LayerOptions): any;
|
|
28
28
|
addLayer(layer: any): void;
|
|
29
|
-
|
|
29
|
+
addKML(feature: kml.Feature | kml.KMLFile): void;
|
|
30
30
|
uninit(): void;
|
|
31
31
|
zoomIn(): void;
|
|
32
32
|
zoomOut(): void;
|
|
@@ -40,13 +40,13 @@ export class CesiumMap extends map.MapControl
|
|
|
40
40
|
map2ScnPos(mapPos: math.Coord2D): math.Coord2D;
|
|
41
41
|
scn2MapPos(scnPos: math.Coord2D): math.Coord2D;
|
|
42
42
|
|
|
43
|
-
createMarker(mapPos: math.Coord2D, imgURL: string, imgWidth: number, imgHeight: number, options?: MarkerOptions): any;
|
|
43
|
+
createMarker(mapPos: math.Coord2D, imgURL: string, imgWidth: number, imgHeight: number, options?: map.MarkerOptions): any;
|
|
44
44
|
layerAddMarker(markerLayer: any, marker: any): void;
|
|
45
45
|
layerRemoveMarker(markerLayer: any, marker: any): void;
|
|
46
46
|
layerClearMarkers(markerLayer: any): void;
|
|
47
47
|
markerIsOver(marker: any, scnPos: math.Coord2D): boolean;
|
|
48
48
|
|
|
49
|
-
createGeometry(geom: geometry.Vector2D, options: GeometryOptions): any;
|
|
49
|
+
createGeometry(geom: geometry.Vector2D, options: map.GeometryOptions): any;
|
|
50
50
|
layerAddGeometry(geometryLayer: any, geom: any): void;
|
|
51
51
|
layerRemoveGeometry(geometryLayer: any, geom: any): void;
|
|
52
52
|
layerClearGeometries(geometryLayer: any): void;
|
package/cesium.js
CHANGED
|
@@ -154,8 +154,12 @@ export function fromPolygonGraphics(viewer, pg)
|
|
|
154
154
|
return new geometry.Polygon(4326, coordinates);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
export function
|
|
157
|
+
export function createFromKML(feature, options)
|
|
158
158
|
{
|
|
159
|
+
if (feature instanceof kml.KMLFile)
|
|
160
|
+
{
|
|
161
|
+
return createFromKML(feature.root, options);
|
|
162
|
+
}
|
|
159
163
|
options = data.mergeOptions(options, {noPopup: false});
|
|
160
164
|
if (feature instanceof kml.Container)
|
|
161
165
|
{
|
|
@@ -164,7 +168,7 @@ export function createFromKMLFeature(feature, options)
|
|
|
164
168
|
let layer;
|
|
165
169
|
for (i in feature.features)
|
|
166
170
|
{
|
|
167
|
-
layer =
|
|
171
|
+
layer = createFromKML(feature.features[i], options);
|
|
168
172
|
if (layer instanceof Cesium.Entity)
|
|
169
173
|
{
|
|
170
174
|
layers.push(layer);
|
|
@@ -432,9 +436,9 @@ export class CesiumMap extends map.MapControl
|
|
|
432
436
|
}
|
|
433
437
|
}
|
|
434
438
|
|
|
435
|
-
|
|
439
|
+
addKML(feature)
|
|
436
440
|
{
|
|
437
|
-
this.addLayer(
|
|
441
|
+
this.addLayer(createFromKML(feature));
|
|
438
442
|
}
|
|
439
443
|
|
|
440
444
|
// uninit(): void;
|
package/data.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export function isArray(o: any): boolean;
|
|
2
2
|
export function isObject(o: any): boolean;
|
|
3
3
|
export function toObjectString(o: any, lev: number): string;
|
|
4
|
-
export function arrayBuffer2Base64(buff:
|
|
4
|
+
export function arrayBuffer2Base64(buff: ArrayBuffer): string;
|
|
5
|
+
export function arrayBufferEquals(buff1: ArrayBuffer, buff2: ArrayBuffer): boolean;
|
|
5
6
|
export function compare(a: any, b: any): number;
|
|
6
7
|
export function sort(arr: object[], compareFunc?: (val1: object, val2: object) => number, firstIndex?: number, lastIndex?: number): void;
|
|
7
8
|
export function mergeOptions(options: object | null, defOptions: object): object;
|
|
@@ -11,6 +12,11 @@ export function readUInt24(arr: Uint8Array, index: number): number;
|
|
|
11
12
|
export function readMUInt24(arr: Uint8Array, index: number): number;
|
|
12
13
|
export function readUInt32(arr: Uint8Array, index: number): number;
|
|
13
14
|
export function readMUInt32(arr: Uint8Array, index: number): number;
|
|
15
|
+
export function rol32(v: number, n: number): number;
|
|
16
|
+
export function ror32(v: number, n: number): number;
|
|
17
|
+
export function shl32(v: number, n: number): number;
|
|
18
|
+
export function sar32(v: number, n: number): number;
|
|
19
|
+
export function shr32(v: number, n: number): number;
|
|
14
20
|
|
|
15
21
|
export class DateValue
|
|
16
22
|
{
|
|
@@ -19,7 +25,7 @@ export class DateValue
|
|
|
19
25
|
day: number;
|
|
20
26
|
|
|
21
27
|
constructor();
|
|
22
|
-
}
|
|
28
|
+
}
|
|
23
29
|
|
|
24
30
|
export class TimeValue extends DateValue
|
|
25
31
|
{
|
|
@@ -30,7 +36,7 @@ export class TimeValue extends DateValue
|
|
|
30
36
|
tzQhr: number;
|
|
31
37
|
|
|
32
38
|
constructor();
|
|
33
|
-
}
|
|
39
|
+
}
|
|
34
40
|
|
|
35
41
|
export class DateTimeUtil
|
|
36
42
|
{
|
|
@@ -40,28 +46,28 @@ export class DateTimeUtil
|
|
|
40
46
|
static timeValueSetTime(t: TimeValue, timeStrs: string[]): void;
|
|
41
47
|
static date2TotalDays(year: number, month: number, day: number): number;
|
|
42
48
|
static dateValue2TotalDays(d: DateValue): number;
|
|
43
|
-
static timeValue2Secs(tval: TimeValue):
|
|
44
|
-
static timeValue2Ticks(t: TimeValue):
|
|
49
|
+
static timeValue2Secs(tval: TimeValue): bigint;
|
|
50
|
+
static timeValue2Ticks(t: TimeValue): bigint;
|
|
45
51
|
static ticks2TimeValue(ticks: number, tzQhr?: number): TimeValue;
|
|
46
|
-
static secs2TimeValue(secs:
|
|
52
|
+
static secs2TimeValue(secs: bigint, tzQhr?: number): TimeValue;
|
|
47
53
|
static totalDays2DateValue(totalDays: number, d: DateValue): void;
|
|
48
|
-
static instant2TimeValue(secs:
|
|
54
|
+
static instant2TimeValue(secs: bigint, nanosec: number, tzQhr?: number): TimeValue;
|
|
49
55
|
static toString(tval: TimeValue, pattern: string): string;
|
|
50
56
|
static string2TimeValue(dateStr: string, tzQhr?: number): TimeValue;
|
|
51
57
|
static isYearLeap(year: number): boolean;
|
|
52
58
|
static parseYearStr(year: string): number;
|
|
53
59
|
static parseMonthStr(month: string): number;
|
|
54
60
|
static getLocalTzQhr(): number;
|
|
55
|
-
}
|
|
61
|
+
}
|
|
56
62
|
|
|
57
63
|
export class Duration
|
|
58
64
|
{
|
|
59
|
-
seconds:
|
|
65
|
+
seconds: bigint;
|
|
60
66
|
ns: number;
|
|
61
|
-
constructor(seconds: number, nanosec: number);
|
|
67
|
+
constructor(seconds: number | bigint, nanosec: number);
|
|
62
68
|
static fromTicks(ticks: number): Duration;
|
|
63
|
-
static fromUs(us:
|
|
64
|
-
getSeconds():
|
|
69
|
+
static fromUs(us: bigint): Duration;
|
|
70
|
+
getSeconds(): bigint;
|
|
65
71
|
getNS(): number;
|
|
66
72
|
getTotalMS(): number;
|
|
67
73
|
getTotalSec(): number;
|
|
@@ -72,7 +78,7 @@ export class Duration
|
|
|
72
78
|
|
|
73
79
|
export class LocalDate
|
|
74
80
|
{
|
|
75
|
-
static DATE_NULL: number
|
|
81
|
+
static DATE_NULL: number;
|
|
76
82
|
|
|
77
83
|
dateVal: number;
|
|
78
84
|
constructor();
|
|
@@ -91,17 +97,19 @@ export class LocalDate
|
|
|
91
97
|
toString(pattern: string | null): string;
|
|
92
98
|
compareTo(obj: Date): number;
|
|
93
99
|
isNull(): boolean;
|
|
100
|
+
static today(): LocalDate;
|
|
101
|
+
static fromStr(s: string): LocalDate | null;
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
export class TimeInstant
|
|
97
105
|
{
|
|
98
|
-
sec:
|
|
106
|
+
sec: bigint;
|
|
99
107
|
nanosec: number;
|
|
100
108
|
|
|
101
|
-
constructor(sec: number, nanosec: number);
|
|
109
|
+
constructor(sec: bigint | number, nanosec: number);
|
|
102
110
|
static now(): TimeInstant;
|
|
103
|
-
static fromVariTime(variTime: number): TimeInstant;
|
|
104
|
-
static fromTicks(ticks: number): TimeInstant;
|
|
111
|
+
static fromVariTime(variTime: bigint | number): TimeInstant;
|
|
112
|
+
static fromTicks(ticks: bigint | number): TimeInstant;
|
|
105
113
|
addDay(val: number): TimeInstant;
|
|
106
114
|
addHour(val: number): TimeInstant;
|
|
107
115
|
addMinute(val: number): TimeInstant;
|
|
@@ -117,26 +125,26 @@ export class TimeInstant
|
|
|
117
125
|
diffSecDbl(ts: TimeInstant): number;
|
|
118
126
|
diff(ts: TimeInstant): Duration;
|
|
119
127
|
toTicks(): number;
|
|
120
|
-
toDotNetTicks():
|
|
128
|
+
toDotNetTicks(): bigint;
|
|
121
129
|
toUnixTimestamp(): number;
|
|
122
|
-
toEpochSec():
|
|
123
|
-
toEpochMS():
|
|
124
|
-
toEpochNS():
|
|
130
|
+
toEpochSec(): bigint;
|
|
131
|
+
toEpochMS(): bigint;
|
|
132
|
+
toEpochNS(): bigint;
|
|
125
133
|
}
|
|
126
134
|
|
|
127
135
|
export class Timestamp {
|
|
128
136
|
constructor(inst: TimeInstant, tzQhr?: number);
|
|
129
|
-
static fromTicks(ticks: number, tzQhr?: number): Timestamp;
|
|
130
|
-
static fromStr(str: string, defTzQhr?: number): Timestamp;
|
|
137
|
+
static fromTicks(ticks: number | number, tzQhr?: number): Timestamp;
|
|
138
|
+
static fromStr(str: string, defTzQhr?: number): Timestamp | null;
|
|
131
139
|
static now(): Timestamp;
|
|
132
140
|
static utcNow(): Timestamp;
|
|
133
141
|
static fromVariTime(variTime: any): Timestamp;
|
|
134
142
|
static fromSecNS(unixTS: number, nanosec: number, tzQhr?: number): Timestamp;
|
|
135
|
-
static fromDotNetTicks(ticks:
|
|
136
|
-
static fromEpochSec(epochSec: number, tzQhr?: number): Timestamp;
|
|
137
|
-
static fromEpochMS(epochMS: number, tzQhr?: number): Timestamp;
|
|
138
|
-
static fromEpochUS(epochUS: number, tzQhr?: number): Timestamp;
|
|
139
|
-
static fromEpochNS(epochNS: number, tzQhr?: number): Timestamp;
|
|
143
|
+
static fromDotNetTicks(ticks: bigint, tzQhr?: number): Timestamp;
|
|
144
|
+
static fromEpochSec(epochSec: number | bigint, tzQhr?: number): Timestamp;
|
|
145
|
+
static fromEpochMS(epochMS: number | bigint, tzQhr?: number): Timestamp;
|
|
146
|
+
static fromEpochUS(epochUS: number | bigint, tzQhr?: number): Timestamp;
|
|
147
|
+
static fromEpochNS(epochNS: number | bigint, tzQhr?: number): Timestamp;
|
|
140
148
|
static fromTimeValue(tval: TimeValue): Timestamp;
|
|
141
149
|
static fromYMDHMS(ymdhms: number, tzQhr?: number): Timestamp;
|
|
142
150
|
addMonth(val: number): Timestamp;
|
|
@@ -161,9 +169,9 @@ export class Timestamp {
|
|
|
161
169
|
toTicks(): number;
|
|
162
170
|
toDotNetTicks(): number;
|
|
163
171
|
toUnixTimestamp(): number;
|
|
164
|
-
toEpochSec():
|
|
165
|
-
toEpochMS():
|
|
166
|
-
toEpochNS():
|
|
172
|
+
toEpochSec(): bigint;
|
|
173
|
+
toEpochMS(): bigint;
|
|
174
|
+
toEpochNS(): bigint;
|
|
167
175
|
toString(pattern?: string): string;
|
|
168
176
|
toStringISO8601(): string;
|
|
169
177
|
toStringNoZone(): string;
|
|
@@ -183,18 +191,22 @@ export class ByteReader
|
|
|
183
191
|
|
|
184
192
|
constructor(arr: ArrayBuffer);
|
|
185
193
|
getLength(): number;
|
|
186
|
-
getArrayBuffer(ofst
|
|
194
|
+
getArrayBuffer(ofst?: number, size?: number): ArrayBuffer;
|
|
195
|
+
getU8Arr(ofst?: number, size?: number): Uint8Array;
|
|
187
196
|
|
|
188
197
|
readUInt8(ofst: number): number;
|
|
189
198
|
readUInt16(ofst: number, lsb: boolean): number;
|
|
199
|
+
readUInt24(ofst: number, lsb: boolean): number;
|
|
190
200
|
readUInt32(ofst: number, lsb: boolean): number;
|
|
191
201
|
readInt8(ofst: number): number;
|
|
192
202
|
readInt16(ofst: number, lsb: boolean): number;
|
|
203
|
+
readInt24(ofst: number, lsb: boolean): number;
|
|
193
204
|
readInt32(ofst: number, lsb: boolean): number;
|
|
194
205
|
readFloat64(ofst: number, lsb: boolean): number;
|
|
195
206
|
readUTF8(ofst: number, len: number): string;
|
|
196
207
|
readUTF8Z(ofst: number, maxSize?: number): string;
|
|
197
|
-
|
|
208
|
+
readUTF16(ofst: number, nChar: number, lsb: boolean): string;
|
|
209
|
+
|
|
198
210
|
readUInt8Arr(ofst: number, cnt: number): number[];
|
|
199
211
|
readUInt16Arr(ofst: number, lsb: boolean, cnt: number): number[];
|
|
200
212
|
readUInt32Arr(ofst: number, lsb: boolean, cnt: number): number[];
|
|
@@ -202,4 +214,13 @@ export class ByteReader
|
|
|
202
214
|
readInt16Arr(ofst: number, lsb: boolean, cnt: number): number[];
|
|
203
215
|
readInt32Arr(ofst: number, lsb: boolean, cnt: number): number[];
|
|
204
216
|
readFloat64Arr(ofst: number, lsb: boolean, cnt: number): number[];
|
|
217
|
+
|
|
218
|
+
isASCIIText(ofst: number, len: number): boolean;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export abstract class ParsedObject
|
|
222
|
+
{
|
|
223
|
+
sourceName: string;
|
|
224
|
+
objType: string;
|
|
225
|
+
constructor(sourceName: string, objType: string);
|
|
205
226
|
}
|