Add a Batch Tool to the Context Menu
Hey All,
I want to add a "Clear All" option when right clicking.
This would including all highlights, markups etc.
In Silverlight there was an option create a batch tool through the admin but I understand this has to now be done in the Json. Can anyone provide an example they use so I get the syntax right?
Chris
0
-
Hi Chris,
I would recommend doing this through a workflow, and then adding the corresponding workflow to the right click menu through the viewer management pack; no JSON editing required!
Adding a workflow to the right click context menu would use the same syntax as adding a workflow to the toolbar or I Want To menu: RunWorkflowById, and the ID of the workflow.
I'd be happy to whip up a quick example workflow if you'd like.
Thanks!
Danny0 -
Danny beat me to the punch, and his suggestion is the more prudent approach, as manually editing json takes you into "here be dragons" territory, but -- for what it's worth -- you could add this to the MapContextMenu: { "iconUri": "Resources/Images/Icons/Toolbar/clear-24.png", "text": "Clear all", "description": "Removes all markup and clears the current selection", "batch": [ { "command": "ClearMarkupQuiet", "commandParameter": null }, { "command": "ClearSelection", "commandParameter": null }, { "command": "ClearHighlights", "commandParameter": null } ] }0 -
Thanks Guys,
Both ideas are what I was looking for..I didnt think about doing it through a workflow but that definitely makes sense.0
Please sign in to leave a comment.
Comments
3 comments