cd-mapgis 1.0.60 → 1.0.61

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.60",
3
+ "version": "1.0.61",
4
4
  "main": "./src/index.js",
5
5
  "types": "./src/index.d.ts",
6
6
  "type": "module",
package/src/LayerUtil.js CHANGED
@@ -210,7 +210,7 @@ export default class LayerUtil {
210
210
  * [[116.4074, 39.9042], [121.4737, 31.2304]]
211
211
  * @param {*} p
212
212
  */
213
- static getJsonPointsLayer(p) {
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 });
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;