@vtx/map 1.1.48 → 1.1.49

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.
@@ -70,11 +70,11 @@ var TMap = /*#__PURE__*/function (_React$Component) {
70
70
  _this.waitInit = null; //等加载定时
71
71
  _this.isLoading = false; //是否加载完
72
72
  _this.waitReceive = null; //等初始化,更新定时
73
+ _this.mapCreated = false;
73
74
  _this.state = {
74
75
  gis: null,
75
76
  //地图对象
76
77
  mapId: props.mapId,
77
- mapCreated: false,
78
78
  pointIds: [],
79
79
  //地图上点的ids
80
80
  lineIds: [],
@@ -257,9 +257,7 @@ var TMap = /*#__PURE__*/function (_React$Component) {
257
257
  t.zoomEnd();
258
258
  //初始化地图点击事件
259
259
  t.clickMap();
260
- t.setState({
261
- mapCreated: true
262
- });
260
+ this.mapCreated = true;
263
261
  }
264
262
  }, {
265
263
  key: "createMap",
@@ -2880,8 +2878,8 @@ var TMap = /*#__PURE__*/function (_React$Component) {
2880
2878
  var t = this;
2881
2879
  }
2882
2880
  }, {
2883
- key: "componentWillReceiveProps",
2884
- value: function componentWillReceiveProps(nextProps, prevProps) {
2881
+ key: "UNSAFE_componentWillReceiveProps",
2882
+ value: function UNSAFE_componentWillReceiveProps(nextProps, prevProps) {
2885
2883
  //已加载组件,收到新的参数时调用
2886
2884
  var t = this;
2887
2885
  var receive = function receive() {
@@ -2941,7 +2939,7 @@ var TMap = /*#__PURE__*/function (_React$Component) {
2941
2939
  infoWindowData = nextProps.infoWindowData;
2942
2940
 
2943
2941
  // 等待地图加载
2944
- if (!t.state.mapCreated) return;
2942
+ if (!t.mapCreated) return;
2945
2943
  // 设置地图样式
2946
2944
  if (!t.deepEqual(mapStyle, t.props.mapStyle)) {
2947
2945
  if (mapStyle) {