react-map4d-map 1.2.4 → 1.2.6

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.
@@ -0,0 +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
+ }
@@ -0,0 +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 declare type ILatLng = LatLng | {
35
+ lat: number;
36
+ lng: number;
37
+ } | [number, number] | null;
@@ -0,0 +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
+ }
@@ -0,0 +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
+ }
@@ -0,0 +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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-map4d-map",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "react-map4d-map",
5
5
  "author": "vantoan2509",
6
6
  "license": "MIT",