cd-mapgis 1.0.75 → 1.0.76
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 +1 -1
- package/src/StyleUtil.js +21 -3
package/package.json
CHANGED
package/src/StyleUtil.js
CHANGED
|
@@ -21,6 +21,15 @@ export default class StyleUtil {
|
|
|
21
21
|
}),
|
|
22
22
|
fill: new Fill({
|
|
23
23
|
color: 'rgba(0, 0, 0, 0)' // 透明填充
|
|
24
|
+
}),
|
|
25
|
+
image: new Circle({
|
|
26
|
+
radius: 5,
|
|
27
|
+
stroke: new Stroke({
|
|
28
|
+
color: 'rgba(0, 0, 0, 0.7)'
|
|
29
|
+
}),
|
|
30
|
+
fill: new Fill({
|
|
31
|
+
color: 'rgba(255, 255, 255, 0.2)'
|
|
32
|
+
})
|
|
24
33
|
})
|
|
25
34
|
});
|
|
26
35
|
}
|
|
@@ -86,8 +95,8 @@ export default class StyleUtil {
|
|
|
86
95
|
anchorXUnits: 'fraction',
|
|
87
96
|
anchorYUnits: 'pixels',
|
|
88
97
|
offsetOrigin: 'top-right',
|
|
89
|
-
scale:p.scale ?? 0.5,
|
|
90
|
-
offset:p.offset ?? [0,10],
|
|
98
|
+
scale: p.scale ?? 0.5,
|
|
99
|
+
offset: p.offset ?? [0, 10],
|
|
91
100
|
// offset:[0,10],
|
|
92
101
|
//图标缩放比例
|
|
93
102
|
//scale:0.5,
|
|
@@ -156,7 +165,7 @@ export default class StyleUtil {
|
|
|
156
165
|
});
|
|
157
166
|
if (p.text) {
|
|
158
167
|
styleParam.text = StyleUtil.getText(p.text);
|
|
159
|
-
}
|
|
168
|
+
}
|
|
160
169
|
return new Style(styleParam);
|
|
161
170
|
}
|
|
162
171
|
/**
|
|
@@ -181,6 +190,15 @@ export default class StyleUtil {
|
|
|
181
190
|
color: lineColor,
|
|
182
191
|
width: lineWidth
|
|
183
192
|
});
|
|
193
|
+
styleParam.image = new Circle({
|
|
194
|
+
radius: 5,
|
|
195
|
+
stroke: new Stroke({
|
|
196
|
+
color: 'rgba(0, 0, 0, 0.7)'
|
|
197
|
+
}),
|
|
198
|
+
fill: new Fill({
|
|
199
|
+
color: 'rgba(255, 255, 255, 0.2)'
|
|
200
|
+
})
|
|
201
|
+
});
|
|
184
202
|
if (p.img) {
|
|
185
203
|
styleParam.image = StyleUtil.getIcon(p.img);
|
|
186
204
|
}
|