cd-mapgis 1.0.60 → 1.0.62
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/LayerUtil.js +2 -2
- package/src/MapView.js +3 -1
package/package.json
CHANGED
package/src/LayerUtil.js
CHANGED
|
@@ -210,14 +210,14 @@ export default class LayerUtil {
|
|
|
210
210
|
* [[116.4074, 39.9042], [121.4737, 31.2304]]
|
|
211
211
|
* @param {*} p
|
|
212
212
|
*/
|
|
213
|
-
static
|
|
213
|
+
static getTracePointsLayer(p) {
|
|
214
214
|
let coordinates = JSON.parse(p.data);
|
|
215
215
|
let geometry = new LineString(coordinates);
|
|
216
216
|
let feature = new Feature({ geometry: geometry });
|
|
217
217
|
let vectorSource = new VectorSource({ features: [feature] });
|
|
218
218
|
let layer = new VectorLayer({
|
|
219
219
|
source: vectorSource,
|
|
220
|
-
style: p
|
|
220
|
+
style: StyleUtil.getPointStyle(p)
|
|
221
221
|
});
|
|
222
222
|
return { layer: layer, geometry: geometry };
|
|
223
223
|
}
|
package/src/MapView.js
CHANGED
|
@@ -83,7 +83,9 @@ export default class MapView {
|
|
|
83
83
|
let res;
|
|
84
84
|
if (p.type == 'jsonPoints') {
|
|
85
85
|
res = LayerUtil.getJsonPointsLayer(p);
|
|
86
|
-
} else {
|
|
86
|
+
} else if(p.type == 'tracePoints'){
|
|
87
|
+
res = LayerUtil.getTracePointsLayer(p);
|
|
88
|
+
}else {
|
|
87
89
|
res = LayerUtil.getJsonLayer(p);
|
|
88
90
|
}
|
|
89
91
|
this._view_templayer = res.layer;
|