react-map4d-map 1.3.9 → 1.4.0
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/components/MFBuilding.d.ts +21 -21
- package/dist/components/MFBuildingOverlay.d.ts +10 -10
- package/dist/components/MFCircle.d.ts +18 -18
- package/dist/components/MFDataLayer.d.ts +7 -7
- package/dist/components/MFDirectionsRenderer.d.ts +31 -31
- package/dist/components/MFGroundOverlay.d.ts +6 -6
- package/dist/components/MFImageOverlay.d.ts +6 -6
- package/dist/components/MFMap.d.ts +38 -38
- package/dist/components/MFMarker.d.ts +36 -36
- package/dist/components/MFMarkerCluster.d.ts +8 -8
- package/dist/components/MFPOI.d.ts +19 -19
- package/dist/components/MFPOIOverlay.d.ts +6 -6
- package/dist/components/MFPolygon.d.ts +21 -18
- package/dist/components/MFPolyline.d.ts +22 -22
- package/dist/components/MFTileOverlay.d.ts +10 -10
- package/dist/context/Map4dContext.d.ts +6 -7
- package/dist/context/index.d.ts +2 -2
- package/dist/context/{MarkerClusterContext.d.ts → markerClusterContext.d.ts} +8 -9
- package/dist/engine/Color.d.ts +34 -34
- package/dist/engine/MathUtils.d.ts +8 -8
- package/dist/engine/Matrix.d.ts +115 -115
- package/dist/engine/ResourceReference.d.ts +8 -8
- package/dist/engine/Shader.d.ts +118 -118
- package/dist/engine/ShaderSource.d.ts +42 -42
- package/dist/engine/Texture.d.ts +51 -51
- package/dist/engine/Vector2.d.ts +82 -82
- package/dist/engine/Vector3.d.ts +84 -84
- package/dist/engine/Vertex.d.ts +2 -2
- package/dist/enum/index.d.ts +2 -2
- package/dist/enum/mapEventEnum.d.ts +11 -11
- package/dist/index.d.ts +18 -18
- package/dist/index.js +2309 -2330
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2290 -2314
- package/dist/index.modern.js.map +1 -1
- package/dist/map/ProjectionMercator.d.ts +26 -26
- package/dist/models/LatLng.d.ts +37 -37
- package/dist/models/Map4dObject.d.ts +32 -32
- package/dist/models/MapConstants.d.ts +165 -165
- package/dist/tool/index.d.ts +1 -1
- package/dist/tool/variableTool.d.ts +3 -3
- package/dist/ultils/CoordinateTransformer.d.ts +11 -11
- package/package.json +23 -16
- package/dist/engine/Framebuffer.d.ts +0 -16
- package/dist/engine/Model.d.ts +0 -77
- package/dist/index.test.d.ts +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Vector2 } from "../engine/Vector2";
|
|
2
|
-
import { LatLng } from "../models/LatLng";
|
|
3
|
-
export declare class ProjectionMercator {
|
|
4
|
-
/**
|
|
5
|
-
* ok for test
|
|
6
|
-
* @param latLng
|
|
7
|
-
* @param worldSize
|
|
8
|
-
*/
|
|
9
|
-
private static projectInternal;
|
|
10
|
-
/**
|
|
11
|
-
* ok for test
|
|
12
|
-
* @param latLng
|
|
13
|
-
*/
|
|
14
|
-
static convertToMeterFromLatLng(latLng: LatLng): Vector2;
|
|
15
|
-
/**
|
|
16
|
-
* ok for test
|
|
17
|
-
* @param meters
|
|
18
|
-
*/
|
|
19
|
-
static convertToLatLngFromMeter(meters: Vector2): LatLng;
|
|
20
|
-
/**
|
|
21
|
-
* ok for test
|
|
22
|
-
* @param latLng
|
|
23
|
-
* @param zoom
|
|
24
|
-
*/
|
|
25
|
-
static projectZoom(latLng: LatLng, zoom: number): Vector2;
|
|
26
|
-
}
|
|
1
|
+
import { Vector2 } from "../engine/Vector2";
|
|
2
|
+
import { LatLng } from "../models/LatLng";
|
|
3
|
+
export declare class ProjectionMercator {
|
|
4
|
+
/**
|
|
5
|
+
* ok for test
|
|
6
|
+
* @param latLng
|
|
7
|
+
* @param worldSize
|
|
8
|
+
*/
|
|
9
|
+
private static projectInternal;
|
|
10
|
+
/**
|
|
11
|
+
* ok for test
|
|
12
|
+
* @param latLng
|
|
13
|
+
*/
|
|
14
|
+
static convertToMeterFromLatLng(latLng: LatLng): Vector2;
|
|
15
|
+
/**
|
|
16
|
+
* ok for test
|
|
17
|
+
* @param meters
|
|
18
|
+
*/
|
|
19
|
+
static convertToLatLngFromMeter(meters: Vector2): LatLng;
|
|
20
|
+
/**
|
|
21
|
+
* ok for test
|
|
22
|
+
* @param latLng
|
|
23
|
+
* @param zoom
|
|
24
|
+
*/
|
|
25
|
+
static projectZoom(latLng: LatLng, zoom: number): Vector2;
|
|
26
|
+
}
|
package/dist/models/LatLng.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { Map4dObject } from "./Map4dObject";
|
|
2
|
-
export declare class LatLng extends Map4dObject {
|
|
3
|
-
/** Latitude, in degrees. */
|
|
4
|
-
lat: number;
|
|
5
|
-
/** Longitude, in degrees. */
|
|
6
|
-
lng: number;
|
|
7
|
-
constructor(lat: number, lng: number);
|
|
8
|
-
/**
|
|
9
|
-
* Comparison function.
|
|
10
|
-
* @param other
|
|
11
|
-
*/
|
|
12
|
-
equals(other: LatLng): boolean;
|
|
13
|
-
valid(): boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Converts to string representation.
|
|
16
|
-
*/
|
|
17
|
-
toString(): string;
|
|
18
|
-
static convert(input: ILatLng): LatLng;
|
|
19
|
-
distanceTo(target: ILatLng): number;
|
|
20
|
-
normalize(): LatLng;
|
|
21
|
-
/**
|
|
22
|
-
* add to another LatLng
|
|
23
|
-
* @param a
|
|
24
|
-
* @returns {LatLng}
|
|
25
|
-
*/
|
|
26
|
-
add(a: LatLng): LatLng;
|
|
27
|
-
/**
|
|
28
|
-
* subtract with another LatLng
|
|
29
|
-
* @param a
|
|
30
|
-
* @returns {LatLng}
|
|
31
|
-
*/
|
|
32
|
-
subtract(a: LatLng): LatLng;
|
|
33
|
-
}
|
|
34
|
-
export
|
|
35
|
-
lat: number;
|
|
36
|
-
lng: number;
|
|
37
|
-
} | [number, number] | null;
|
|
1
|
+
import { Map4dObject } from "./Map4dObject";
|
|
2
|
+
export declare class LatLng extends Map4dObject {
|
|
3
|
+
/** Latitude, in degrees. */
|
|
4
|
+
lat: number;
|
|
5
|
+
/** Longitude, in degrees. */
|
|
6
|
+
lng: number;
|
|
7
|
+
constructor(lat: number, lng: number);
|
|
8
|
+
/**
|
|
9
|
+
* Comparison function.
|
|
10
|
+
* @param other
|
|
11
|
+
*/
|
|
12
|
+
equals(other: LatLng): boolean;
|
|
13
|
+
valid(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Converts to string representation.
|
|
16
|
+
*/
|
|
17
|
+
toString(): string;
|
|
18
|
+
static convert(input: ILatLng): LatLng;
|
|
19
|
+
distanceTo(target: ILatLng): number;
|
|
20
|
+
normalize(): LatLng;
|
|
21
|
+
/**
|
|
22
|
+
* add to another LatLng
|
|
23
|
+
* @param a
|
|
24
|
+
* @returns {LatLng}
|
|
25
|
+
*/
|
|
26
|
+
add(a: LatLng): LatLng;
|
|
27
|
+
/**
|
|
28
|
+
* subtract with another LatLng
|
|
29
|
+
* @param a
|
|
30
|
+
* @returns {LatLng}
|
|
31
|
+
*/
|
|
32
|
+
subtract(a: LatLng): LatLng;
|
|
33
|
+
}
|
|
34
|
+
export type ILatLng = LatLng | {
|
|
35
|
+
lat: number;
|
|
36
|
+
lng: number;
|
|
37
|
+
} | [number, number] | null;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export declare enum ClassType {
|
|
2
|
-
MARKER = 0,
|
|
3
|
-
CIRCLE = 1,
|
|
4
|
-
POLYLINE = 2,
|
|
5
|
-
POLYGON = 3,
|
|
6
|
-
POI = 4,
|
|
7
|
-
BUILDING = 5,
|
|
8
|
-
VECTOR_TILE_LAYER = 6,
|
|
9
|
-
BUILDING_QUERY_RESULT = 7,
|
|
10
|
-
POLYLINE_DATA = 8,
|
|
11
|
-
POLYGON_DATA = 9,
|
|
12
|
-
ICON = 10,
|
|
13
|
-
LATLNG = 11,
|
|
14
|
-
POINT = 12,
|
|
15
|
-
CAMERA_POSITION = 13,
|
|
16
|
-
LATLNG_BOUNDS = 14,
|
|
17
|
-
MARKER_LABEL = 15,
|
|
18
|
-
FEATURE = 16,
|
|
19
|
-
TILE_FEATURE = 17,
|
|
20
|
-
VECTOR_TILE_FEATURE = 18
|
|
21
|
-
}
|
|
22
|
-
export declare class Map4dObject {
|
|
23
|
-
private readonly classType;
|
|
24
|
-
constructor(classType: ClassType);
|
|
25
|
-
/**
|
|
26
|
-
* Check classType in mapObject
|
|
27
|
-
* @param mapObject
|
|
28
|
-
* @param classType
|
|
29
|
-
* @returns
|
|
30
|
-
*/
|
|
31
|
-
static isClassType(mapObject: any, classType: ClassType): boolean;
|
|
32
|
-
}
|
|
1
|
+
export declare enum ClassType {
|
|
2
|
+
MARKER = 0,
|
|
3
|
+
CIRCLE = 1,
|
|
4
|
+
POLYLINE = 2,
|
|
5
|
+
POLYGON = 3,
|
|
6
|
+
POI = 4,
|
|
7
|
+
BUILDING = 5,
|
|
8
|
+
VECTOR_TILE_LAYER = 6,
|
|
9
|
+
BUILDING_QUERY_RESULT = 7,
|
|
10
|
+
POLYLINE_DATA = 8,
|
|
11
|
+
POLYGON_DATA = 9,
|
|
12
|
+
ICON = 10,
|
|
13
|
+
LATLNG = 11,
|
|
14
|
+
POINT = 12,
|
|
15
|
+
CAMERA_POSITION = 13,
|
|
16
|
+
LATLNG_BOUNDS = 14,
|
|
17
|
+
MARKER_LABEL = 15,
|
|
18
|
+
FEATURE = 16,
|
|
19
|
+
TILE_FEATURE = 17,
|
|
20
|
+
VECTOR_TILE_FEATURE = 18
|
|
21
|
+
}
|
|
22
|
+
export declare class Map4dObject {
|
|
23
|
+
private readonly classType;
|
|
24
|
+
constructor(classType: ClassType);
|
|
25
|
+
/**
|
|
26
|
+
* Check classType in mapObject
|
|
27
|
+
* @param mapObject
|
|
28
|
+
* @param classType
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
static isClassType(mapObject: any, classType: ClassType): boolean;
|
|
32
|
+
}
|
|
@@ -1,165 +1,165 @@
|
|
|
1
|
-
import { Matrix4 } from "../engine/Matrix";
|
|
2
|
-
import { Color } from "../engine/Color";
|
|
3
|
-
export declare class MapConstants {
|
|
4
|
-
static none: number;
|
|
5
|
-
static baseTileSize: number;
|
|
6
|
-
static minLatitude: number;
|
|
7
|
-
static maxLatitude: number;
|
|
8
|
-
static maxLongitude: number;
|
|
9
|
-
static minLongitude: number;
|
|
10
|
-
static maxDegrees: number;
|
|
11
|
-
static radiusEarthMeters: number;
|
|
12
|
-
static halfEarthCircumFerenceInMeter: number;
|
|
13
|
-
static earthCircumFerenceInMeter: number;
|
|
14
|
-
static tileCacheSize: number;
|
|
15
|
-
static baseMapLowestOrder: number;
|
|
16
|
-
static baseMapMiddleOrder: number;
|
|
17
|
-
static buildingLayerOrder: number;
|
|
18
|
-
static userPOILayerOrder: number;
|
|
19
|
-
static pointGeoJsonWidth: number;
|
|
20
|
-
static pointGeoJsonHeight: number;
|
|
21
|
-
static placeSelectedIdPrefix: string;
|
|
22
|
-
static placeWidth: number;
|
|
23
|
-
static placeHeight: number;
|
|
24
|
-
static spritePadding: number;
|
|
25
|
-
static get placeFontSize(): number;
|
|
26
|
-
static poiFontWeight: string;
|
|
27
|
-
static poiMaxWidth: number;
|
|
28
|
-
static poiNumLine: number;
|
|
29
|
-
static poiDefaultColor: Color;
|
|
30
|
-
static pointGeoJsonAnchor: number[];
|
|
31
|
-
static infoWindowPadding: number;
|
|
32
|
-
static flingMinVelocity: number;
|
|
33
|
-
static flingMaxVelocity: number;
|
|
34
|
-
static flingTimeConstant: number;
|
|
35
|
-
static flingSpeedMultiply: number;
|
|
36
|
-
static zoomSpeedMouseWheel: number;
|
|
37
|
-
static minDurationFlyTo: number;
|
|
38
|
-
static maxDurationFlyTo: number;
|
|
39
|
-
static maxBearingAngle: number;
|
|
40
|
-
static defaultMinZoom: number;
|
|
41
|
-
static defaultMinZoom3d: number;
|
|
42
|
-
static defaultMaxZoom: number;
|
|
43
|
-
static defaultMaxNativeZoom: number;
|
|
44
|
-
static geoJsonMinNativeZoom: number;
|
|
45
|
-
static vectorBuildingsMinZoom: number;
|
|
46
|
-
static tileExtend: number;
|
|
47
|
-
static defaultAnimationDuration: number;
|
|
48
|
-
static defaultFlyZoom: number;
|
|
49
|
-
static minTilt: number;
|
|
50
|
-
static maxTilt2D: number;
|
|
51
|
-
static maxTilt3D: number;
|
|
52
|
-
static get maxTiltIntersectWithScreen(): number;
|
|
53
|
-
static minTiltReduceFog: number;
|
|
54
|
-
static minTimeMoving: number;
|
|
55
|
-
static minTimeDoubleZoom: number;
|
|
56
|
-
static minTimeSpanTo: number;
|
|
57
|
-
static maxTimeSpanTo: number;
|
|
58
|
-
static skyboxMapBorderMinimum: number;
|
|
59
|
-
static metersPerPixelAtLatitude: number;
|
|
60
|
-
static mapBackgroundColor2D: Color;
|
|
61
|
-
static mapBackgroundColor3D: Color;
|
|
62
|
-
static satellitePOIColor: Color;
|
|
63
|
-
static satellitePOIHalo: Color;
|
|
64
|
-
static mapBackgroundScaleRatio: number;
|
|
65
|
-
static clusterMaxPointCount: number;
|
|
66
|
-
static biasMatrix: Matrix4;
|
|
67
|
-
static FPS: number;
|
|
68
|
-
static buildingOverlayIdPrefix: string;
|
|
69
|
-
static customBuildingType: string;
|
|
70
|
-
static touchBoxSize: number;
|
|
71
|
-
static zoomStep: number;
|
|
72
|
-
static distanceRatioToForceMoveCamera: number; /** ratio with screen size to force move camera when call flyTo() method **/
|
|
73
|
-
static gridIndexExtent: number;
|
|
74
|
-
static gridIndexN: number;
|
|
75
|
-
static gridIndexPadding: number;
|
|
76
|
-
}
|
|
77
|
-
export declare class SymbolConstants {
|
|
78
|
-
static defaultSymbol: string;
|
|
79
|
-
static geoJsonLayerId: string;
|
|
80
|
-
}
|
|
81
|
-
export declare class LayerConstants {
|
|
82
|
-
/** Map layer */
|
|
83
|
-
static readonly rasterLayerId = "1.0.rasterLayer";
|
|
84
|
-
static readonly surfaceLayerId = "1.1.vector.surfaces";
|
|
85
|
-
static readonly roadsLayerId = "1.2.vector.roads";
|
|
86
|
-
static readonly boundaryLayerId = "1.3.vector.boundaries";
|
|
87
|
-
static readonly labelLayerId = "4.label.tile";
|
|
88
|
-
static readonly rasterOverlayLayerId = "1.4.rasterOverlay";
|
|
89
|
-
static readonly imageOverlayLayerId = "5.imageOverlay";
|
|
90
|
-
static readonly buildingOverlayLayerId = "2.buildingOverlay";
|
|
91
|
-
static readonly pointLayerId = "2.maplink.vector.tile.points";
|
|
92
|
-
static readonly pointOverlayLayerId = "2.maplink.overlay.tile.points";
|
|
93
|
-
static readonly userPOILayerId = "1.maplink.vector.tile.user.poi";
|
|
94
|
-
static readonly buildingLayerId = "2.buildingLayer";
|
|
95
|
-
static readonly userBuildingLayerId = "3.userBuilding.layer";
|
|
96
|
-
/** Tile layer */
|
|
97
|
-
static readonly roadTileLayerId = "roadTileLayer";
|
|
98
|
-
static readonly labelTileLayerId = "labelTileLayer";
|
|
99
|
-
static readonly pointTileLayerId = "pointTileLayer";
|
|
100
|
-
static readonly buildingTileLayerId = "buildingTileLayer";
|
|
101
|
-
static readonly rasterTileLayerId = "rasterTileLayer";
|
|
102
|
-
}
|
|
103
|
-
export declare class MathConstants {
|
|
104
|
-
static rad2Deg: number;
|
|
105
|
-
static deg2Rad: number;
|
|
106
|
-
static epsilon: number;
|
|
107
|
-
}
|
|
108
|
-
export declare class CameraConstants {
|
|
109
|
-
static fov: number;
|
|
110
|
-
static nearPlane: number;
|
|
111
|
-
static farPlane: number;
|
|
112
|
-
static height: number;
|
|
113
|
-
}
|
|
114
|
-
export declare class PolyConstants {
|
|
115
|
-
static numTrianglesOnRoundCap: number;
|
|
116
|
-
static numTrianglesOnRoundJoin: number;
|
|
117
|
-
static numTrianglesPerCircle: number;
|
|
118
|
-
}
|
|
119
|
-
export declare class ParticleConstants {
|
|
120
|
-
static rainFrequency: number;
|
|
121
|
-
static rainParticleRotation: number;
|
|
122
|
-
static snowFrequency: number;
|
|
123
|
-
}
|
|
124
|
-
export declare class WeatherConstants {
|
|
125
|
-
static refreshTime: number; /** miliseconds */
|
|
126
|
-
static refreshDistance: number; /** meter */
|
|
127
|
-
}
|
|
128
|
-
export declare class ColorConstants {
|
|
129
|
-
static skyColors: {
|
|
130
|
-
Morning: Color;
|
|
131
|
-
Noon: Color;
|
|
132
|
-
AfterNoon: Color;
|
|
133
|
-
Evening: Color;
|
|
134
|
-
};
|
|
135
|
-
static fogColors: {
|
|
136
|
-
Morning: Color;
|
|
137
|
-
Noon: Color;
|
|
138
|
-
AfterNoon: Color;
|
|
139
|
-
Evening: Color;
|
|
140
|
-
};
|
|
141
|
-
static lightColors: {
|
|
142
|
-
Morning: Color;
|
|
143
|
-
Noon: Color;
|
|
144
|
-
AfterNoon: Color;
|
|
145
|
-
Evening: Color;
|
|
146
|
-
};
|
|
147
|
-
static getSkyColor(name: string): Color;
|
|
148
|
-
static getFogColor(name: string): Color;
|
|
149
|
-
static getLightColor(name: string): Color;
|
|
150
|
-
}
|
|
151
|
-
export declare class TimeConstants {
|
|
152
|
-
static morningTime: number;
|
|
153
|
-
static noonTime: number;
|
|
154
|
-
static afterNoonTime: number;
|
|
155
|
-
static eveningTime: number;
|
|
156
|
-
}
|
|
157
|
-
export declare class FontConstant {
|
|
158
|
-
static fontTextureWidth: number;
|
|
159
|
-
static fontTextureHeight: number;
|
|
160
|
-
static get fontSize(): number;
|
|
161
|
-
}
|
|
162
|
-
export declare class LabelConstant {
|
|
163
|
-
/** Max angle (degree) of 2 segment on path that can create text data **/
|
|
164
|
-
static maxCurvedTextAngle: number;
|
|
165
|
-
}
|
|
1
|
+
import { Matrix4 } from "../engine/Matrix";
|
|
2
|
+
import { Color } from "../engine/Color";
|
|
3
|
+
export declare class MapConstants {
|
|
4
|
+
static none: number;
|
|
5
|
+
static baseTileSize: number;
|
|
6
|
+
static minLatitude: number;
|
|
7
|
+
static maxLatitude: number;
|
|
8
|
+
static maxLongitude: number;
|
|
9
|
+
static minLongitude: number;
|
|
10
|
+
static maxDegrees: number;
|
|
11
|
+
static radiusEarthMeters: number;
|
|
12
|
+
static halfEarthCircumFerenceInMeter: number;
|
|
13
|
+
static earthCircumFerenceInMeter: number;
|
|
14
|
+
static tileCacheSize: number;
|
|
15
|
+
static baseMapLowestOrder: number;
|
|
16
|
+
static baseMapMiddleOrder: number;
|
|
17
|
+
static buildingLayerOrder: number;
|
|
18
|
+
static userPOILayerOrder: number;
|
|
19
|
+
static pointGeoJsonWidth: number;
|
|
20
|
+
static pointGeoJsonHeight: number;
|
|
21
|
+
static placeSelectedIdPrefix: string;
|
|
22
|
+
static placeWidth: number;
|
|
23
|
+
static placeHeight: number;
|
|
24
|
+
static spritePadding: number;
|
|
25
|
+
static get placeFontSize(): number;
|
|
26
|
+
static poiFontWeight: string;
|
|
27
|
+
static poiMaxWidth: number;
|
|
28
|
+
static poiNumLine: number;
|
|
29
|
+
static poiDefaultColor: Color;
|
|
30
|
+
static pointGeoJsonAnchor: number[];
|
|
31
|
+
static infoWindowPadding: number;
|
|
32
|
+
static flingMinVelocity: number;
|
|
33
|
+
static flingMaxVelocity: number;
|
|
34
|
+
static flingTimeConstant: number;
|
|
35
|
+
static flingSpeedMultiply: number;
|
|
36
|
+
static zoomSpeedMouseWheel: number;
|
|
37
|
+
static minDurationFlyTo: number;
|
|
38
|
+
static maxDurationFlyTo: number;
|
|
39
|
+
static maxBearingAngle: number;
|
|
40
|
+
static defaultMinZoom: number;
|
|
41
|
+
static defaultMinZoom3d: number;
|
|
42
|
+
static defaultMaxZoom: number;
|
|
43
|
+
static defaultMaxNativeZoom: number;
|
|
44
|
+
static geoJsonMinNativeZoom: number;
|
|
45
|
+
static vectorBuildingsMinZoom: number;
|
|
46
|
+
static tileExtend: number;
|
|
47
|
+
static defaultAnimationDuration: number;
|
|
48
|
+
static defaultFlyZoom: number;
|
|
49
|
+
static minTilt: number;
|
|
50
|
+
static maxTilt2D: number;
|
|
51
|
+
static maxTilt3D: number;
|
|
52
|
+
static get maxTiltIntersectWithScreen(): number;
|
|
53
|
+
static minTiltReduceFog: number;
|
|
54
|
+
static minTimeMoving: number;
|
|
55
|
+
static minTimeDoubleZoom: number;
|
|
56
|
+
static minTimeSpanTo: number;
|
|
57
|
+
static maxTimeSpanTo: number;
|
|
58
|
+
static skyboxMapBorderMinimum: number;
|
|
59
|
+
static metersPerPixelAtLatitude: number;
|
|
60
|
+
static mapBackgroundColor2D: Color;
|
|
61
|
+
static mapBackgroundColor3D: Color;
|
|
62
|
+
static satellitePOIColor: Color;
|
|
63
|
+
static satellitePOIHalo: Color;
|
|
64
|
+
static mapBackgroundScaleRatio: number;
|
|
65
|
+
static clusterMaxPointCount: number;
|
|
66
|
+
static biasMatrix: Matrix4;
|
|
67
|
+
static FPS: number;
|
|
68
|
+
static buildingOverlayIdPrefix: string;
|
|
69
|
+
static customBuildingType: string;
|
|
70
|
+
static touchBoxSize: number;
|
|
71
|
+
static zoomStep: number;
|
|
72
|
+
static distanceRatioToForceMoveCamera: number; /** ratio with screen size to force move camera when call flyTo() method **/
|
|
73
|
+
static gridIndexExtent: number;
|
|
74
|
+
static gridIndexN: number;
|
|
75
|
+
static gridIndexPadding: number;
|
|
76
|
+
}
|
|
77
|
+
export declare class SymbolConstants {
|
|
78
|
+
static defaultSymbol: string;
|
|
79
|
+
static geoJsonLayerId: string;
|
|
80
|
+
}
|
|
81
|
+
export declare class LayerConstants {
|
|
82
|
+
/** Map layer */
|
|
83
|
+
static readonly rasterLayerId = "1.0.rasterLayer";
|
|
84
|
+
static readonly surfaceLayerId = "1.1.vector.surfaces";
|
|
85
|
+
static readonly roadsLayerId = "1.2.vector.roads";
|
|
86
|
+
static readonly boundaryLayerId = "1.3.vector.boundaries";
|
|
87
|
+
static readonly labelLayerId = "4.label.tile";
|
|
88
|
+
static readonly rasterOverlayLayerId = "1.4.rasterOverlay";
|
|
89
|
+
static readonly imageOverlayLayerId = "5.imageOverlay";
|
|
90
|
+
static readonly buildingOverlayLayerId = "2.buildingOverlay";
|
|
91
|
+
static readonly pointLayerId = "2.maplink.vector.tile.points";
|
|
92
|
+
static readonly pointOverlayLayerId = "2.maplink.overlay.tile.points";
|
|
93
|
+
static readonly userPOILayerId = "1.maplink.vector.tile.user.poi";
|
|
94
|
+
static readonly buildingLayerId = "2.buildingLayer";
|
|
95
|
+
static readonly userBuildingLayerId = "3.userBuilding.layer";
|
|
96
|
+
/** Tile layer */
|
|
97
|
+
static readonly roadTileLayerId = "roadTileLayer";
|
|
98
|
+
static readonly labelTileLayerId = "labelTileLayer";
|
|
99
|
+
static readonly pointTileLayerId = "pointTileLayer";
|
|
100
|
+
static readonly buildingTileLayerId = "buildingTileLayer";
|
|
101
|
+
static readonly rasterTileLayerId = "rasterTileLayer";
|
|
102
|
+
}
|
|
103
|
+
export declare class MathConstants {
|
|
104
|
+
static rad2Deg: number;
|
|
105
|
+
static deg2Rad: number;
|
|
106
|
+
static epsilon: number;
|
|
107
|
+
}
|
|
108
|
+
export declare class CameraConstants {
|
|
109
|
+
static fov: number;
|
|
110
|
+
static nearPlane: number;
|
|
111
|
+
static farPlane: number;
|
|
112
|
+
static height: number;
|
|
113
|
+
}
|
|
114
|
+
export declare class PolyConstants {
|
|
115
|
+
static numTrianglesOnRoundCap: number;
|
|
116
|
+
static numTrianglesOnRoundJoin: number;
|
|
117
|
+
static numTrianglesPerCircle: number;
|
|
118
|
+
}
|
|
119
|
+
export declare class ParticleConstants {
|
|
120
|
+
static rainFrequency: number;
|
|
121
|
+
static rainParticleRotation: number;
|
|
122
|
+
static snowFrequency: number;
|
|
123
|
+
}
|
|
124
|
+
export declare class WeatherConstants {
|
|
125
|
+
static refreshTime: number; /** miliseconds */
|
|
126
|
+
static refreshDistance: number; /** meter */
|
|
127
|
+
}
|
|
128
|
+
export declare class ColorConstants {
|
|
129
|
+
static skyColors: {
|
|
130
|
+
Morning: Color;
|
|
131
|
+
Noon: Color;
|
|
132
|
+
AfterNoon: Color;
|
|
133
|
+
Evening: Color;
|
|
134
|
+
};
|
|
135
|
+
static fogColors: {
|
|
136
|
+
Morning: Color;
|
|
137
|
+
Noon: Color;
|
|
138
|
+
AfterNoon: Color;
|
|
139
|
+
Evening: Color;
|
|
140
|
+
};
|
|
141
|
+
static lightColors: {
|
|
142
|
+
Morning: Color;
|
|
143
|
+
Noon: Color;
|
|
144
|
+
AfterNoon: Color;
|
|
145
|
+
Evening: Color;
|
|
146
|
+
};
|
|
147
|
+
static getSkyColor(name: string): Color;
|
|
148
|
+
static getFogColor(name: string): Color;
|
|
149
|
+
static getLightColor(name: string): Color;
|
|
150
|
+
}
|
|
151
|
+
export declare class TimeConstants {
|
|
152
|
+
static morningTime: number;
|
|
153
|
+
static noonTime: number;
|
|
154
|
+
static afterNoonTime: number;
|
|
155
|
+
static eveningTime: number;
|
|
156
|
+
}
|
|
157
|
+
export declare class FontConstant {
|
|
158
|
+
static fontTextureWidth: number;
|
|
159
|
+
static fontTextureHeight: number;
|
|
160
|
+
static get fontSize(): number;
|
|
161
|
+
}
|
|
162
|
+
export declare class LabelConstant {
|
|
163
|
+
/** Max angle (degree) of 2 segment on path that can create text data **/
|
|
164
|
+
static maxCurvedTextAngle: number;
|
|
165
|
+
}
|
package/dist/tool/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./variableTool";
|
|
1
|
+
export * from "./variableTool";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare class VariableTool {
|
|
2
|
-
static hasValue: (variable: any) => boolean;
|
|
3
|
-
}
|
|
1
|
+
export declare class VariableTool {
|
|
2
|
+
static hasValue: (variable: any) => boolean;
|
|
3
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ILatLng, LatLng } from "../models/LatLng";
|
|
2
|
-
export declare class CoordinateTransformer {
|
|
3
|
-
private coordinates;
|
|
4
|
-
constructor(coordinates: ILatLng[]);
|
|
5
|
-
setCoordinates(coordinates: ILatLng[]): void;
|
|
6
|
-
addCoordinates(coordinates: ILatLng[]): void;
|
|
7
|
-
rotate(degree: number, anchor?: ILatLng): LatLng[];
|
|
8
|
-
translate(target: ILatLng, anchor?: ILatLng): LatLng[];
|
|
9
|
-
scale(scale: number, anchor?: ILatLng): LatLng[];
|
|
10
|
-
get center(): LatLng;
|
|
11
|
-
}
|
|
1
|
+
import { ILatLng, LatLng } from "../models/LatLng";
|
|
2
|
+
export declare class CoordinateTransformer {
|
|
3
|
+
private coordinates;
|
|
4
|
+
constructor(coordinates: ILatLng[]);
|
|
5
|
+
setCoordinates(coordinates: ILatLng[]): void;
|
|
6
|
+
addCoordinates(coordinates: ILatLng[]): void;
|
|
7
|
+
rotate(degree: number, anchor?: ILatLng): LatLng[];
|
|
8
|
+
translate(target: ILatLng, anchor?: ILatLng): LatLng[];
|
|
9
|
+
scale(scale: number, anchor?: ILatLng): LatLng[];
|
|
10
|
+
get center(): LatLng;
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-map4d-map",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "react-map4d-map",
|
|
5
5
|
"author": "vantoan2509",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,14 +12,15 @@
|
|
|
12
12
|
"node": ">=10"
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
|
-
"build": "
|
|
16
|
-
"start": "
|
|
15
|
+
"build": "tsup && tsc --emitDeclarationOnly",
|
|
16
|
+
"start": "tsup --watch",
|
|
17
|
+
"typecheck": "tsc --noEmit",
|
|
17
18
|
"prepare": "run-s build",
|
|
18
19
|
"test": "run-s test:unit test:lint test:build",
|
|
19
20
|
"test:build": "run-s build",
|
|
20
21
|
"test:lint": "eslint .",
|
|
21
|
-
"test:unit": "
|
|
22
|
-
"test:watch": "
|
|
22
|
+
"test:unit": "vitest run",
|
|
23
|
+
"test:watch": "vitest",
|
|
23
24
|
"predeploy": "cd example && npm install && npm run build",
|
|
24
25
|
"deploy": "gh-pages -d example/build"
|
|
25
26
|
},
|
|
@@ -28,12 +29,12 @@
|
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@testing-library/jest-dom": "^4.2.4",
|
|
31
|
-
"@testing-library/react": "^
|
|
32
|
-
"@testing-library/user-event": "^
|
|
33
|
-
"@types/jest": "^
|
|
34
|
-
"@types/node": "^
|
|
35
|
-
"@types/react": "^
|
|
36
|
-
"@types/react-dom": "^
|
|
32
|
+
"@testing-library/react": "^14.3.1",
|
|
33
|
+
"@testing-library/user-event": "^14.5.2",
|
|
34
|
+
"@types/jest": "^29.5.14",
|
|
35
|
+
"@types/node": "^22.10.0",
|
|
36
|
+
"@types/react": "^18.3.12",
|
|
37
|
+
"@types/react-dom": "^18.3.1",
|
|
37
38
|
"@typescript-eslint/eslint-plugin": "^2.26.0",
|
|
38
39
|
"@typescript-eslint/parser": "^2.26.0",
|
|
39
40
|
"babel-eslint": "^10.0.3",
|
|
@@ -49,13 +50,19 @@
|
|
|
49
50
|
"eslint-plugin-react": "^7.17.0",
|
|
50
51
|
"eslint-plugin-standard": "^4.0.1",
|
|
51
52
|
"gh-pages": "^2.2.0",
|
|
52
|
-
"
|
|
53
|
+
"tsup": "^8.5.1",
|
|
53
54
|
"npm-run-all": "^4.1.5",
|
|
54
55
|
"prettier": "^2.0.4",
|
|
55
|
-
"react": "^
|
|
56
|
-
"react-dom": "^
|
|
57
|
-
"
|
|
58
|
-
"
|
|
56
|
+
"react": "^18.3.1",
|
|
57
|
+
"react-dom": "^18.3.1",
|
|
58
|
+
"typescript": "^7.0.2",
|
|
59
|
+
"vite": "^6.0.3",
|
|
60
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
61
|
+
"vitest": "^3.0.5",
|
|
62
|
+
"jsdom": "^26.0.0"
|
|
63
|
+
},
|
|
64
|
+
"overrides": {
|
|
65
|
+
"typescript": "^7.0.2"
|
|
59
66
|
},
|
|
60
67
|
"files": [
|
|
61
68
|
"dist"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Texture } from "./Texture";
|
|
2
|
-
export declare class FrameBuffer {
|
|
3
|
-
private gl;
|
|
4
|
-
private width;
|
|
5
|
-
private height;
|
|
6
|
-
frameBufferId: WebGLFramebuffer;
|
|
7
|
-
colorTexture: Texture;
|
|
8
|
-
depthBuffer: WebGLRenderbuffer;
|
|
9
|
-
private isReady;
|
|
10
|
-
constructor(gl: WebGLRenderingContext, width: number, height: number);
|
|
11
|
-
init(): boolean;
|
|
12
|
-
bind(): void;
|
|
13
|
-
unbind(): void;
|
|
14
|
-
drawDebug(): void;
|
|
15
|
-
destroy(): void;
|
|
16
|
-
}
|