@vtx/map 1.2.19 → 1.2.20

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.
@@ -179,6 +179,12 @@ var TMap = /*#__PURE__*/function (_React$Component) {
179
179
  resolve();
180
180
  });
181
181
  });
182
+ var HeatmapNew = new Promise(function (resolve, reject) {
183
+ //新版的热力图--老的暂不废弃,但是有问题
184
+ $.getScript("".concat(_default2["default"].mapServerURL, "/HeatmapOverlay.js"), function () {
185
+ resolve();
186
+ });
187
+ });
182
188
  var PointCollection = new Promise(function (resolve, reject) {
183
189
  $.getScript("".concat(_default2["default"].mapServerURL, "/GPointCollection.js"), function () {
184
190
  resolve();
@@ -194,7 +200,7 @@ var TMap = /*#__PURE__*/function (_React$Component) {
194
200
  // })
195
201
  // });
196
202
 
197
- Promise.all([Heatmap, PointCollection, ImageOverlays
203
+ Promise.all([Heatmap, PointCollection, ImageOverlays, HeatmapNew
198
204
  /*,components*/
199
205
  ]).then(function () {
200
206
  if (t.waitInit) {
@@ -1873,10 +1879,17 @@ var TMap = /*#__PURE__*/function (_React$Component) {
1873
1879
  }
1874
1880
 
1875
1881
  if (!t.heatmap) {
1876
- t.heatmap = new TMapLib.HeatmapOverlay({
1877
- visible: cg.visible
1878
- });
1879
- t.heatmap.initialize(t.state.gis, t.pointCollectionId);
1882
+ if (T.HeatmapOverlay) {
1883
+ t.heatmap = new T.HeatmapOverlay({
1884
+ visible: cg.visible
1885
+ });
1886
+ t.state.gis.addOverLay(t.heatmap);
1887
+ } else {
1888
+ t.heatmap = new TMapLib.HeatmapOverlay({
1889
+ visible: cg.visible
1890
+ });
1891
+ t.heatmap.initialize(t.state.gis, t.pointCollectionId);
1892
+ }
1880
1893
  }
1881
1894
 
1882
1895
  var option = {