cd-mapgis 1.0.72 → 1.0.74

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.0.72",
3
+ "version": "1.0.74",
4
4
  "main": "./src/index.js",
5
5
  "types": "./src/index.d.ts",
6
6
  "type": "module",
package/src/LayerUtil.js CHANGED
@@ -202,7 +202,7 @@ export default class LayerUtil {
202
202
  let geometry = geoJSON.readGeometry(p.data);
203
203
  let feature = new Feature({ geometry: geometry });
204
204
  let vectorSource = new VectorSource({ features: [feature] });
205
- p.style = p.style ? StyleUtil.getPointStyle(p) : StyleUtil.getViewOnTemplayerStyle();
205
+ p.style = p.style ? StyleUtil.getPointStyle(p.style) : StyleUtil.getViewOnTemplayerStyle();
206
206
  let layer = new VectorLayer({
207
207
  source: vectorSource,
208
208
  style: p.style
@@ -218,7 +218,7 @@ export default class LayerUtil {
218
218
  let geometry = wktFormat.readGeometry(p.data);
219
219
  let feature = new Feature({ geometry: geometry });
220
220
  let vectorSource = new VectorSource({ features: [feature] });
221
- p.style = p.style ? StyleUtil.getPointStyle(p) : StyleUtil.getViewOnTemplayerStyle();
221
+ p.style = p.style ? StyleUtil.getPointStyle(p.style) : StyleUtil.getViewOnTemplayerStyle();
222
222
  let layer = new VectorLayer({
223
223
  source: vectorSource,
224
224
  style: p.style
package/src/StyleUtil.js CHANGED
@@ -86,6 +86,8 @@ export default class StyleUtil {
86
86
  anchorXUnits: 'fraction',
87
87
  anchorYUnits: 'pixels',
88
88
  offsetOrigin: 'top-right',
89
+ scale:p.scale ?? 0.5,
90
+ offset:p.offset ?? [0,10],
89
91
  // offset:[0,10],
90
92
  //图标缩放比例
91
93
  //scale:0.5,