Skip to content

Commit

Permalink
refactor(workspace-edition): add feature
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierSaintCyr committed Apr 19, 2024
1 parent 97a72d1 commit 6ded4a7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/app/pages/portal/portal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,18 +655,12 @@ export class PortalComponent implements OnInit, OnDestroy {
return;
}

const feature = {
type: 'Feature',
properties: this.createFeatureProperties(workspace.layer)
};

this.workspaceState.rowsInMapExtentCheckCondition$.next(false);
workspace.createFeature(feature);
workspace.createFeature();
}

createFeatureProperties(layer: ImageLayer | VectorLayer) {
let properties = {};
console.log('source fields', layer.options.sourceOptions.sourceFields);
layer.options.sourceOptions.sourceFields.forEach((field) => {
if (!field.primary) {
properties[field.name] = '';
Expand Down

0 comments on commit 6ded4a7

Please sign in to comment.