cd-mapgis 1.1.8 → 1.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cd-mapgis",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "main": "./src/index.js",
5
5
  "types": "./src/index.d.ts",
6
6
  "type": "module",
package/src/PointLayer.js CHANGED
@@ -5,6 +5,7 @@ import Point from 'ol/geom/Point.js';
5
5
  import Style from 'ol/style/Style.js';
6
6
  import Icon from 'ol/style/Icon.js';
7
7
  import MapView from './MapView.js';
8
+ import Fill from 'ol/style/Fill.js';
8
9
 
9
10
  /**
10
11
  * 自定义点图层
@@ -42,7 +43,7 @@ export default class PointLayer {
42
43
  geometry: new Point(p.point)
43
44
  });
44
45
  let styleParam = {};
45
- if (styleParam.img) {
46
+ if (p.img) {
46
47
  styleParam.image = new Icon({
47
48
  src: p.img, // 外部图标路径
48
49
  scale: 1, // 缩放比例
@@ -52,7 +53,7 @@ export default class PointLayer {
52
53
  anchorYUnits: 'fraction'
53
54
  });
54
55
  }
55
- if (styleParam.text) {
56
+ if (p.text) {
56
57
  let font = p.font ? p.font : 'bold 20px 宋体';
57
58
  let corlor = p.corlor ? p.corlor : '#0619e9';
58
59
  let offsetY = p.offsetY ? p.offsetY : -10;