@vtx/map 1.2.5 → 1.2.7
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/TMap/TMap.js
CHANGED
|
@@ -404,6 +404,14 @@ var TMap = /*#__PURE__*/function (_React$Component) {
|
|
|
404
404
|
t.state.gis["clearFrameSelectById"] = function (id) {
|
|
405
405
|
return t.clearFrameSelectById(id);
|
|
406
406
|
};
|
|
407
|
+
|
|
408
|
+
t.state.gis["showInfoWindow"] = function (obj) {
|
|
409
|
+
return t.showInfoWindow(obj);
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
t.state.gis["hideInfoWindow"] = function () {
|
|
413
|
+
return t.hideInfoWindow();
|
|
414
|
+
};
|
|
407
415
|
} // 框选
|
|
408
416
|
|
|
409
417
|
}, {
|
|
@@ -1930,6 +1938,39 @@ var TMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1930
1938
|
infowindow && t.state.gis.closeInfoWindow();
|
|
1931
1939
|
}
|
|
1932
1940
|
}
|
|
1941
|
+
}, {
|
|
1942
|
+
key: "showInfoWindow",
|
|
1943
|
+
value: function showInfoWindow() {
|
|
1944
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1945
|
+
var _params$width = params.width,
|
|
1946
|
+
width = _params$width === void 0 ? 260 : _params$width,
|
|
1947
|
+
_params$height = params.height,
|
|
1948
|
+
height = _params$height === void 0 ? 500 : _params$height;
|
|
1949
|
+
var t = this;
|
|
1950
|
+
|
|
1951
|
+
if (t.popupWindow) {
|
|
1952
|
+
t.hideInfoWindow();
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
var sContent = document.createElement('div');
|
|
1956
|
+
t.popupWindow = new T.InfoWindow();
|
|
1957
|
+
t.popupWindow.setMinWidth(width);
|
|
1958
|
+
t.popupWindow.setMaxHeight(height);
|
|
1959
|
+
(0, _reactDom.render)(params.content, sContent);
|
|
1960
|
+
t.popupWindow.setContent(sContent);
|
|
1961
|
+
t.state.gis.openInfoWindow(t.popupWindow, new T.LngLat(params.position[0], params.position[1]));
|
|
1962
|
+
}
|
|
1963
|
+
}, {
|
|
1964
|
+
key: "hideInfoWindow",
|
|
1965
|
+
value: function hideInfoWindow() {
|
|
1966
|
+
var t = this;
|
|
1967
|
+
|
|
1968
|
+
if (t.popupWindow) {
|
|
1969
|
+
t.state.gis.closeInfoWindow();
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
t.popupWindow = null;
|
|
1973
|
+
}
|
|
1933
1974
|
/*
|
|
1934
1975
|
参数
|
|
1935
1976
|
geometryType:point/polyline/polygon/circle/rectangle 默认point
|