Reference another activity from a custom form element?
I have a custom form element incorporated into Workflow Designer. I would like to enable user interaction to toggle map layers from the custom form element. I see that in a custom activity one can access the map, host application, or host widget.
Is there a way to either reference another custom activity from the custom form element or access the host application directly from the custom form element? So far I have not stumbled on anything that works.
Basic idea is that a user generates a bunch of intersections of layers from an input area of interest and then is shown information about those intersections in the custom form element with the ability to toggle a layer on the map to make it easy to analyze.
-- Marc
-
Well, I have found one way to do what I need to do though it might not be the most elegant. I realized that since the custom form element is just a reactjs element, that I can access the viewer window object and then find the needed context that way.
In my case I am using the GVH, so I can do:
0 -
let app = window['geocortex'].framework.applications[0];
And then I am at the app level and can interrogate the map layers, run other workflows, etc.
app.commandRegistry.command("RunWorkflowByUrlAndInputs").execute(workflowArgs);
Anyway, thought that might help someone else in the future.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare