Groups
Sign in
Groups
mapstore-developers
Conversations
Labels
About
Send feedback
Help
Mapstore Javascript Api
25 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me
Francois Vitry
unread,
May 28, 2024, 4:48:04 AM
May 28
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mapstore-developers
Hello there is this action :
MapStore2.triggerAction({
type: "ADD_LAYER",
But how to delete the layer?
Thanks
Lorenzo Natali
unread,
May 29, 2024, 5:22:49 AM
May 29
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mapstore-developers
Here you can find the actions available
https://github.com/geosolutions-it/MapStore2/blob/master/web/client/actions/layers.js
You can use MapStore2.triggerAction({ type: "REMOVE_LAYER", layerId: "the <id> attribute specified when ADD_LAYER was called"})
Shivendra Das
unread,
May 29, 2024, 9:43:07 AM
May 29
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mapstore-developers
Hi Francois
Below way you can remove layer.
MapStore2.triggerAction({
type: 'REMOVE_LAYER',
layerId: layerId
});
Regards
Shivendra Nath Das
Reply all
Reply to author
Forward
0 new messages