@antv/l7-map 2.9.36-alpha.1 → 2.9.37-alpha.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/es/camera.js +4 -2
- package/es/earthmap.js +2 -1
- package/es/geo/simple.d.ts +1 -0
- package/es/geo/simple.js +6 -4
- package/es/handler/mouse/mouse_handler.js +4 -2
- package/es/handler/touch/two_touch.js +6 -2
- package/es/map.js +2 -1
- package/lib/camera.js +4 -2
- package/lib/earthmap.js +2 -1
- package/lib/geo/simple.js +6 -2
- package/lib/handler/mouse/mouse_handler.js +4 -2
- package/lib/handler/touch/two_touch.js +6 -2
- package/lib/map.js +2 -1
- package/package.json +3 -3
package/es/camera.js
CHANGED
|
@@ -60,13 +60,15 @@ var Camera = /*#__PURE__*/function (_EventEmitter) {
|
|
|
60
60
|
_this.rotateEnabled = options.rotateEnabled;
|
|
61
61
|
_this.transform = new Transform(minZoom, maxZoom, minPitch, maxPitch, renderWorldCopies);
|
|
62
62
|
return _this;
|
|
63
|
-
}
|
|
63
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
64
|
+
|
|
64
65
|
|
|
65
66
|
_createClass(Camera, [{
|
|
66
67
|
key: "requestRenderFrame",
|
|
67
68
|
value: function requestRenderFrame(cb) {
|
|
68
69
|
return 0;
|
|
69
|
-
}
|
|
70
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
71
|
+
|
|
70
72
|
}, {
|
|
71
73
|
key: "cancelRenderFrame",
|
|
72
74
|
value: function cancelRenderFrame(_) {
|
package/es/earthmap.js
CHANGED
|
@@ -201,7 +201,8 @@ export var EarthMap = /*#__PURE__*/function (_Camera) {
|
|
|
201
201
|
key: "setMaxBounds",
|
|
202
202
|
value: function setMaxBounds(bounds) {
|
|
203
203
|
this.transform.setMaxBounds(LngLatBounds.convert(bounds));
|
|
204
|
-
}
|
|
204
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
205
|
+
|
|
205
206
|
}, {
|
|
206
207
|
key: "setStyle",
|
|
207
208
|
value: function setStyle(style) {
|
package/es/geo/simple.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import LngLat, { LngLatLike } from '../geo/lng_lat';
|
|
2
|
+
export declare function circumferenceAtLatitude(latitude: number): number;
|
|
2
3
|
export declare function mercatorXfromLng(lng: number): number;
|
|
3
4
|
export declare function mercatorYfromLat(lat: number): number;
|
|
4
5
|
export declare function mercatorZfromAltitude(altitude: number, lat: number): number;
|
package/es/geo/simple.js
CHANGED
|
@@ -11,16 +11,16 @@ var earthCircumfrence = 2 * Math.PI * earthRadius; // meters
|
|
|
11
11
|
* The circumference at a line of latitude in meters.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
function circumferenceAtLatitude(latitude) {
|
|
14
|
+
export function circumferenceAtLatitude(latitude) {
|
|
15
15
|
return earthCircumfrence * Math.cos(latitude * Math.PI / 180);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
17
|
export function mercatorXfromLng(lng) {
|
|
19
18
|
return lng;
|
|
20
19
|
}
|
|
21
20
|
export function mercatorYfromLat(lat) {
|
|
22
21
|
return lat;
|
|
23
|
-
}
|
|
22
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
+
|
|
24
24
|
export function mercatorZfromAltitude(altitude, lat) {
|
|
25
25
|
return altitude;
|
|
26
26
|
}
|
|
@@ -29,7 +29,8 @@ export function lngFromMercatorX(x) {
|
|
|
29
29
|
}
|
|
30
30
|
export function latFromMercatorY(y) {
|
|
31
31
|
return y;
|
|
32
|
-
}
|
|
32
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
+
|
|
33
34
|
export function altitudeFromMercatorZ(z, y) {
|
|
34
35
|
return z;
|
|
35
36
|
}
|
|
@@ -43,6 +44,7 @@ export function altitudeFromMercatorZ(z, y) {
|
|
|
43
44
|
* @returns {number} scale factor
|
|
44
45
|
* @private
|
|
45
46
|
*/
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46
48
|
|
|
47
49
|
export function mercatorScale(lat) {
|
|
48
50
|
return 1;
|
|
@@ -108,13 +108,15 @@ var MouseHandler = /*#__PURE__*/function () {
|
|
|
108
108
|
key: "isActive",
|
|
109
109
|
value: function isActive() {
|
|
110
110
|
return this.active;
|
|
111
|
-
}
|
|
111
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
112
|
+
|
|
112
113
|
}, {
|
|
113
114
|
key: "correctButton",
|
|
114
115
|
value: function correctButton(e, button) {
|
|
115
116
|
// eslint-disable-line
|
|
116
117
|
return false; // implemented by child
|
|
117
|
-
}
|
|
118
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
119
|
+
|
|
118
120
|
}, {
|
|
119
121
|
key: "move",
|
|
120
122
|
value: function move(lastPoint, point) {
|
|
@@ -17,7 +17,8 @@ var TwoTouchHandler = /*#__PURE__*/function () {
|
|
|
17
17
|
this.active = false; //@ts-ignore
|
|
18
18
|
|
|
19
19
|
delete this.firstTwoTouches;
|
|
20
|
-
}
|
|
20
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
+
|
|
21
22
|
}, {
|
|
22
23
|
key: "start",
|
|
23
24
|
value: function start(points) {
|
|
@@ -26,7 +27,10 @@ var TwoTouchHandler = /*#__PURE__*/function () {
|
|
|
26
27
|
|
|
27
28
|
}, {
|
|
28
29
|
key: "move",
|
|
29
|
-
value: function move(
|
|
30
|
+
value: function move( // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
+
points, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
32
|
+
pinchAround, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
+
e) {
|
|
30
34
|
return;
|
|
31
35
|
} // eslint-disable-line
|
|
32
36
|
|
package/es/map.js
CHANGED
|
@@ -239,7 +239,8 @@ export var Map = /*#__PURE__*/function (_Camera) {
|
|
|
239
239
|
key: "setMaxBounds",
|
|
240
240
|
value: function setMaxBounds(bounds) {
|
|
241
241
|
this.transform.setMaxBounds(LngLatBounds.convert(bounds));
|
|
242
|
-
}
|
|
242
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
243
|
+
|
|
243
244
|
}, {
|
|
244
245
|
key: "setStyle",
|
|
245
246
|
value: function setStyle(style) {
|
package/lib/camera.js
CHANGED
|
@@ -78,13 +78,15 @@ var Camera = /*#__PURE__*/function (_EventEmitter) {
|
|
|
78
78
|
_this.rotateEnabled = options.rotateEnabled;
|
|
79
79
|
_this.transform = new _transform.default(minZoom, maxZoom, minPitch, maxPitch, renderWorldCopies);
|
|
80
80
|
return _this;
|
|
81
|
-
}
|
|
81
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
82
|
+
|
|
82
83
|
|
|
83
84
|
(0, _createClass2.default)(Camera, [{
|
|
84
85
|
key: "requestRenderFrame",
|
|
85
86
|
value: function requestRenderFrame(cb) {
|
|
86
87
|
return 0;
|
|
87
|
-
}
|
|
88
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
89
|
+
|
|
88
90
|
}, {
|
|
89
91
|
key: "cancelRenderFrame",
|
|
90
92
|
value: function cancelRenderFrame(_) {
|
package/lib/earthmap.js
CHANGED
|
@@ -220,7 +220,8 @@ var EarthMap = /*#__PURE__*/function (_Camera) {
|
|
|
220
220
|
key: "setMaxBounds",
|
|
221
221
|
value: function setMaxBounds(bounds) {
|
|
222
222
|
this.transform.setMaxBounds(_lng_lat_bounds.default.convert(bounds));
|
|
223
|
-
}
|
|
223
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
224
|
+
|
|
224
225
|
}, {
|
|
225
226
|
key: "setStyle",
|
|
226
227
|
value: function setStyle(style) {
|
package/lib/geo/simple.js
CHANGED
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
exports.altitudeFromMercatorZ = altitudeFromMercatorZ;
|
|
11
|
+
exports.circumferenceAtLatitude = circumferenceAtLatitude;
|
|
11
12
|
exports.default = void 0;
|
|
12
13
|
exports.latFromMercatorY = latFromMercatorY;
|
|
13
14
|
exports.lngFromMercatorX = lngFromMercatorX;
|
|
@@ -45,7 +46,8 @@ function mercatorXfromLng(lng) {
|
|
|
45
46
|
|
|
46
47
|
function mercatorYfromLat(lat) {
|
|
47
48
|
return lat;
|
|
48
|
-
}
|
|
49
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
50
|
+
|
|
49
51
|
|
|
50
52
|
function mercatorZfromAltitude(altitude, lat) {
|
|
51
53
|
return altitude;
|
|
@@ -57,7 +59,8 @@ function lngFromMercatorX(x) {
|
|
|
57
59
|
|
|
58
60
|
function latFromMercatorY(y) {
|
|
59
61
|
return y;
|
|
60
|
-
}
|
|
62
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
63
|
+
|
|
61
64
|
|
|
62
65
|
function altitudeFromMercatorZ(z, y) {
|
|
63
66
|
return z;
|
|
@@ -72,6 +75,7 @@ function altitudeFromMercatorZ(z, y) {
|
|
|
72
75
|
* @returns {number} scale factor
|
|
73
76
|
* @private
|
|
74
77
|
*/
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75
79
|
|
|
76
80
|
|
|
77
81
|
function mercatorScale(lat) {
|
|
@@ -119,13 +119,15 @@ var MouseHandler = /*#__PURE__*/function () {
|
|
|
119
119
|
key: "isActive",
|
|
120
120
|
value: function isActive() {
|
|
121
121
|
return this.active;
|
|
122
|
-
}
|
|
122
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
123
|
+
|
|
123
124
|
}, {
|
|
124
125
|
key: "correctButton",
|
|
125
126
|
value: function correctButton(e, button) {
|
|
126
127
|
// eslint-disable-line
|
|
127
128
|
return false; // implemented by child
|
|
128
|
-
}
|
|
129
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
130
|
+
|
|
129
131
|
}, {
|
|
130
132
|
key: "move",
|
|
131
133
|
value: function move(lastPoint, point) {
|
|
@@ -28,7 +28,8 @@ var TwoTouchHandler = /*#__PURE__*/function () {
|
|
|
28
28
|
this.active = false; //@ts-ignore
|
|
29
29
|
|
|
30
30
|
delete this.firstTwoTouches;
|
|
31
|
-
}
|
|
31
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
32
|
+
|
|
32
33
|
}, {
|
|
33
34
|
key: "start",
|
|
34
35
|
value: function start(points) {
|
|
@@ -37,7 +38,10 @@ var TwoTouchHandler = /*#__PURE__*/function () {
|
|
|
37
38
|
|
|
38
39
|
}, {
|
|
39
40
|
key: "move",
|
|
40
|
-
value: function move(
|
|
41
|
+
value: function move( // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
42
|
+
points, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
43
|
+
pinchAround, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44
|
+
e) {
|
|
41
45
|
return;
|
|
42
46
|
} // eslint-disable-line
|
|
43
47
|
|
package/lib/map.js
CHANGED
|
@@ -260,7 +260,8 @@ var Map = /*#__PURE__*/function (_Camera) {
|
|
|
260
260
|
key: "setMaxBounds",
|
|
261
261
|
value: function setMaxBounds(bounds) {
|
|
262
262
|
this.transform.setMaxBounds(_lng_lat_bounds.default.convert(bounds));
|
|
263
|
-
}
|
|
263
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
264
|
+
|
|
264
265
|
}, {
|
|
265
266
|
key: "setStyle",
|
|
266
267
|
value: function setStyle(style) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-map",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.37-alpha.1",
|
|
4
4
|
"description": "l7 map",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "thinkinggis <lzx199065@gmail.com>",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/antvis/L7#readme",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@antv/l7-utils": "2.9.
|
|
42
|
+
"@antv/l7-utils": "2.9.37-alpha.1",
|
|
43
43
|
"@babel/runtime": "^7.7.7",
|
|
44
44
|
"@mapbox/point-geometry": "^0.1.0",
|
|
45
45
|
"@mapbox/unitbezier": "^0.0.0",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"gl-matrix": "^3.1.0",
|
|
48
48
|
"lodash": "^4.17.15"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "6ac153816c5f28967f71888c2a3e9684eb6e7be8"
|
|
51
51
|
}
|