Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const olFeature = olFormat.readFeature(feature, {
dataProjection: feature.projection,
featureProjection: projectionOut
});
olFeature.setId(getEntityId(feature));
if (feature.projection !== undefined) {
olFeature.set('projection', feature.projection);
}
if (feature.extent !== undefined) {
olFeature.set('extent', feature.extent);
}
const mapTitle = getEntityProperty(feature, 'meta.mapTitle');
if (mapTitle !== undefined) {
olFeature.set('mapTitle', mapTitle);
}
olFeature.set('entityRevision', getEntityRevision(feature));
return olFeature;
}
valueAccessor: (entity: object, name: string) => {
return getEntityProperty(entity, name);
},
columns: [
olFeature.setId(getId(feature));
const title = getEntityTitle(feature);
if (title !== undefined) {
olFeature.set('_title', title, true);
}
if (feature.extent !== undefined) {
olFeature.set('_extent', feature.extent, true);
}
if (feature.projection !== undefined) {
olFeature.set('_projection', feature.projection, true);
}
const mapTitle = getEntityProperty(feature, 'meta.mapTitle');
if (mapTitle !== undefined) {
olFeature.set('_mapTitle', mapTitle, true);
}
olFeature.set('_entityRevision', getEntityRevision(feature), true);
const icon = getEntityIcon(feature);
if (icon !== undefined) {
olFeature.set('_icon', icon, true);
}
if (feature.meta && feature.meta.style) {
olFeature.set('_style', feature.meta.style, true);
}
return olFeature;