gis-map-universal 0.8.6 → 0.8.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.
Files changed (2) hide show
  1. package/gismap.umd.js +23 -3
  2. package/package.json +1 -1
package/gismap.umd.js CHANGED
@@ -263174,6 +263174,7 @@ var ol_style_RegularShape = __webpack_require__("35d8");
263174
263174
 
263175
263175
 
263176
263176
 
263177
+
263177
263178
  // 交通事件--突发事件
263178
263179
  // 交通事件--拥堵事件
263179
263180
  // 公路--收费站
@@ -263503,7 +263504,7 @@ var ol_style_RegularShape = __webpack_require__("35d8");
263503
263504
  text: new ol_style_Text["default"]({
263504
263505
  font: "14px sans-serif",
263505
263506
  fill: new Fill["default"]({
263506
- color: "rgb(255, 255, 255)"
263507
+ color: data.textColor || "rgb(255, 255, 255)"
263507
263508
  }),
263508
263509
  // 文字颜色
263509
263510
  stroke: new Stroke["default"]({
@@ -263512,7 +263513,7 @@ var ol_style_RegularShape = __webpack_require__("35d8");
263512
263513
  }),
263513
263514
  // 文字描边
263514
263515
  backgroundFill: new Fill["default"]({
263515
- color: "rgba(94, 110, 158, 0.6)"
263516
+ color: data.textBGColor || "rgba(94, 110, 158, 0.6)"
263516
263517
  }),
263517
263518
  // 背景色(支持透明度)
263518
263519
  backgroundStroke: new Stroke["default"]({
@@ -263523,8 +263524,8 @@ var ol_style_RegularShape = __webpack_require__("35d8");
263523
263524
  text: data.name || "",
263524
263525
  textAlign: "center",
263525
263526
  textBaseline: "bottom",
263527
+ offsetX: data.textOffsetX || 0,
263526
263528
  offsetY: data.textOffsetY || 40,
263527
- // placement: "point",
263528
263529
  overflow: true,
263529
263530
  padding: [0, 2, 0, 2] // 上、右、下、左 padding,可以调整
263530
263531
  }),
@@ -263675,6 +263676,25 @@ var ol_style_RegularShape = __webpack_require__("35d8");
263675
263676
  });
263676
263677
  this.map.addLayer(this.lineLayer);
263677
263678
  },
263679
+ addHeatmapByArr(arr, id) {
263680
+ let existingLayer = this.findLayerByName(id);
263681
+ if (existingLayer) {
263682
+ this.map.removeLayer(existingLayer);
263683
+ }
263684
+ let heatmapLayer = new layer_Heatmap({
263685
+ layerName: id,
263686
+ zIndex: 900,
263687
+ source: new source_Vector["default"]({
263688
+ features: new ol_format_GeoJSON["default"]().readFeatures(arr)
263689
+ }),
263690
+ blur: 18,
263691
+ radius: 2,
263692
+ weight: e => {
263693
+ return 1;
263694
+ }
263695
+ });
263696
+ this.map.addLayer(heatmapLayer);
263697
+ },
263678
263698
  removeLayerByName(layerName) {
263679
263699
  let arry = this.map.getLayers().getArray();
263680
263700
  let foundLayer = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gis-map-universal",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
4
4
  "description": "GIS通用组件",
5
5
  "main": "gismap.umd.js",
6
6
  "private": false,