Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Forma team
Using the following code I manage to create a squared shaped geoJson and add it as an Element in the Hierarchy
But I haven't found a way to actually remove it (or delete it)
Keep in mind I have already tried using the RenderGeojsonApi for the geoJson and keeping the id for using it in the remove method but this approach is not helpful because I want to allow the user to reposition(dragging) the square via moving it with the mouse.
Basically what would be helpful is to use the element path to remove the element entirely (or the urn)
Thanks for the help!
Giannis
async createSquareSelection() {
const geoJson = this.createGeoJSONSquare({x: 0, y: 0}, 100);
const {id, urn, revision} = await this.formaService.forma.integrateElements.createElementHierarchy({
data: {
rootElement: "root",
elements: {
root: {
id: "root",
properties: {
category: "site_limit",
color: "#C4313D",
geometry: {
type: "Inline",
format: "GeoJSON",
geoJson: geoJson,
},
},
},
},
},
});
const res = await this.formaService.forma.proposal.addElement({
urn,
});
}
Solved! Go to Solution.