@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/BMap/Map.js
CHANGED
|
@@ -2020,6 +2020,20 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
2020
2020
|
return t.state.gis.getViewport(allLayers);
|
|
2021
2021
|
}
|
|
2022
2022
|
}
|
|
2023
|
+
} // 设置最佳视野
|
|
2024
|
+
|
|
2025
|
+
}, {
|
|
2026
|
+
key: "fitView",
|
|
2027
|
+
value: function fitView() {
|
|
2028
|
+
var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
2029
|
+
var t = this;
|
|
2030
|
+
|
|
2031
|
+
if ((arr === null || arr === void 0 ? void 0 : arr.length) > 0) {
|
|
2032
|
+
var obj = t.state.gis.getViewport(arr.map(function (item) {
|
|
2033
|
+
return new BMap.Point(item[0], item[1]);
|
|
2034
|
+
}));
|
|
2035
|
+
t.state.gis.centerAndZoom(obj.center, obj.zoom);
|
|
2036
|
+
}
|
|
2023
2037
|
} //获取图元数据
|
|
2024
2038
|
|
|
2025
2039
|
}, {
|
|
@@ -3750,6 +3764,10 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
3750
3764
|
t.setCenter(gt);
|
|
3751
3765
|
};
|
|
3752
3766
|
|
|
3767
|
+
t.state.gis["fitView"] = function (arr) {
|
|
3768
|
+
t.fitView(arr);
|
|
3769
|
+
};
|
|
3770
|
+
|
|
3753
3771
|
t.state.gis["getZoomLevel"] = function () {
|
|
3754
3772
|
return t.getZoomLevel();
|
|
3755
3773
|
};
|