@vtx/map 1.1.54 → 1.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/lib/VtxMap/AMap/AMap.js +19 -0
- package/lib/VtxMap/AMap/AMap.js.map +1 -1
- package/lib/VtxMap/BMap/Map.js +18 -0
- package/lib/VtxMap/BMap/Map.js.map +1 -1
- package/lib/VtxMap/OlMap/Map.js +23 -0
- package/lib/VtxMap/OlMap/Map.js.map +1 -1
- package/lib/VtxMap/TMap/TMap.js +17 -0
- package/lib/VtxMap/TMap/TMap.js.map +1 -1
- package/lib/VtxModal/VtxModal.js +4 -3
- package/lib/VtxModal/VtxModal.js.map +1 -1
- package/lib/VtxSearchMap/VtxSearchMap.js +17 -0
- package/lib/VtxSearchMap/VtxSearchMap.js.map +1 -1
- package/package.json +2 -2
package/lib/VtxMap/TMap/TMap.js
CHANGED
|
@@ -387,6 +387,10 @@ var TMap = /*#__PURE__*/function (_React$Component) {
|
|
|
387
387
|
value: function initPropsForUser() {
|
|
388
388
|
var t = this;
|
|
389
389
|
|
|
390
|
+
t.state.gis["fitView"] = function (arr) {
|
|
391
|
+
t.fitView(arr);
|
|
392
|
+
};
|
|
393
|
+
|
|
390
394
|
t.state.gis["frameSelect"] = function () {
|
|
391
395
|
var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
392
396
|
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -666,6 +670,19 @@ var TMap = /*#__PURE__*/function (_React$Component) {
|
|
|
666
670
|
t.state.gis.centerAndZoom(center, zoom);
|
|
667
671
|
}
|
|
668
672
|
}
|
|
673
|
+
} // 设置最佳视野
|
|
674
|
+
|
|
675
|
+
}, {
|
|
676
|
+
key: "fitView",
|
|
677
|
+
value: function fitView() {
|
|
678
|
+
var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
679
|
+
var t = this;
|
|
680
|
+
|
|
681
|
+
if ((arr === null || arr === void 0 ? void 0 : arr.length) > 0) {
|
|
682
|
+
t.state.gis.setViewport(arr.map(function (item) {
|
|
683
|
+
return new T.LngLat(item[0], item[1]);
|
|
684
|
+
}));
|
|
685
|
+
}
|
|
669
686
|
} //设置地图比例尺
|
|
670
687
|
|
|
671
688
|
}, {
|