We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a447ccd commit ba0685eCopy full SHA for ba0685e
src/openlayers/mapping/WebMap.js
@@ -2322,7 +2322,10 @@ export class WebMap extends Observable {
2322
featureProjection: metaData.featureProjection || this.baseProjection || 'EPSG:4326'
2323
});
2324
//geojson格式的feature属性没有坐标系字段,为了统一,再次加上
2325
- let coordinate = feature.getGeometry().getCoordinates();
+ let geometry = feature.getGeometry();
2326
+ // 如果不存在geometry,也不需要组装feature
2327
+ if(!geometry) {continue;}
2328
+ let coordinate = geometry.getCoordinates();
2329
if (allFeatures[i].geometry.type === 'Point') {
2330
properties.lon = coordinate[0];
2331
properties.lat = coordinate[1];
0 commit comments