Has anyone found a way to delay action or fire action on a mouse click?
We currently have a workflow that allows the users to click on a parcel and view information about that parcel we call the parcel identifier. This tool, although very useful, seems cumbersome to our users because when they click on the parcel they have to click a button "new parcel" before they can select another parcel. We have received a ton of negative feedback about this tool simply because users do not want to select the button before clicking a new parcel. Has anyone found a way to bypass the "flow" so that actions can be fired on a mouse click? Any help would be much appreciated, thank you!
0
-
Hi Austin,
You can use the "MapMouseUpEvent" to trigger an action after the user releases the mouse button from clicking on the map. To find out more information about this event, please consult the "Geocortex SDK for HTML5 API Reference" guide (which is shipped with all HTML5 viewer installation ZIP file).
I have attached a very simple workflow example to demonstrate how to use this event. This workflow just fires an alert after every mouse click. To test it out, you can add it to any site and check the "Run on startup" option. Once you have added it, simply launch the viewer and click anywhere on the map to see the alert pop up.
I hope this helps.
Regards,
Carmen<Activity mc:Ignorable="sap sap2010 sads" x:Class="ActivityBuilder" mva:VisualBasic.Settings="{x:Null}" sap2010:WorkflowViewState.IdRef="ActivityBuilder_1" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:gw="clr-namespace:Geocortex.Workflow;assembly=Geocortex.Workflow" xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow.Activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <TextExpression.NamespacesForImplementation> <sco:Collection x:TypeArguments="x:String"> <x:String>System.Activities</x:String> <x:String>System.Activities.Statements</x:String> <x:String>System.Activities.Expressions</x:String> <x:String>System.Activities.Validation</x:String> <x:String>System.Activities.XamlIntegration</x:String> <x:String>ESRI.ArcGIS.Client</x:String> <x:String>ESRI.ArcGIS.Client.Geometry</x:String> <x:String>ESRI.ArcGIS.Client.Tasks</x:String> <x:String>Geocortex.Core.Extensions</x:String> <x:String>Geocortex.Workflow.Activities</x:String> <x:String>Geocortex.Forms.Client</x:String> <x:String>Geocortex.Forms.Client.Items</x:String> <x:String>Geocortex.Reporting</x:String> <x:String>System</x:String> <x:String>Microsoft.VisualBasic.Activities</x:String> <x:String>System.Collections.Generic</x:String> <x:String>System.Linq</x:String> <x:String>System.Windows.Markup</x:String> <x:String>Geocortex.Workflow</x:String> </sco:Collection> </TextExpression.NamespacesForImplementation> <TextExpression.ReferencesForImplementation> <sco:Collection x:TypeArguments="AssemblyReference"> <AssemblyReference>System.Activities</AssemblyReference> <AssemblyReference>ESRI.ArcGIS.Client</AssemblyReference> <AssemblyReference>Geocortex.Core</AssemblyReference> <AssemblyReference>Geocortex.Workflow</AssemblyReference> <AssemblyReference>Geocortex.EssentialsWpfApi</AssemblyReference> <AssemblyReference>Geocortex.Reporting</AssemblyReference> <AssemblyReference>System.Core</AssemblyReference> <AssemblyReference>System</AssemblyReference> <AssemblyReference>mscorlib</AssemblyReference> <AssemblyReference>PresentationCore</AssemblyReference> <AssemblyReference>WindowsBase</AssemblyReference> <AssemblyReference>PresentationFramework</AssemblyReference> <AssemblyReference>System.Xaml</AssemblyReference> </sco:Collection> </TextExpression.ReferencesForImplementation> <DoWhile sap2010:WorkflowViewState.IdRef="DoWhile_1" Condition="True"> <Sequence sap2010:WorkflowViewState.IdRef="Sequence_1"> <Sequence.Variables> <Variable x:TypeArguments="gw:ExternalObject" Name="externalObject1" /> </Sequence.Variables> <gwa:ListenForExternalEvent EventName="MapMouseUpEvent" sap2010:WorkflowViewState.IdRef="ListenForExternalEvent_1" /> <gwa:CollectExternalEventArgs WaitTimeout="{x:Null}" EventArgs="[externalObject1]" EventName="MapMouseUpEvent" sap2010:WorkflowViewState.IdRef="CollectExternalEventArgs_1" WaitForEvent="True" /> <gwa:Alert sap2010:WorkflowViewState.IdRef="Alert_1" Text="[externalObject1.Json]" /> </Sequence> <sads:DebugSymbol.Symbol>d2xDOlxQcm9ncmFtIEZpbGVzICh4ODYpXExhdGl0dWRlIEdlb2dyYXBoaWNzXEdlb2NvcnRleCBFc3NlbnRpYWxzXEdFXFJFU1QgRWxlbWVudHNcU2l0ZXNcTW91c2VDbGlja0V2ZW50LnhhbWwLNQM/DQIBATVCNUgCAQw2BT0QAgECOgc6fAIBCjsHO8kBAgEFPAc8XAIBAzotOj4CAQs7ZDt1AgEJO0Y7WQIBBzvAATvGAQIBBjxBPFkCAQQ=</sads:DebugSymbol.Symbol> </DoWhile> <sap2010:WorkflowViewState.ViewStateManager> <sap2010:ViewStateManager> <sap2010:ViewStateData Id="ListenForExternalEvent_1" sap:VirtualizedContainerService.HintSize="288,61" /> <sap2010:ViewStateData Id="CollectExternalEventArgs_1" sap:VirtualizedContainerService.HintSize="288,136" /> <sap2010:ViewStateData Id="Alert_1" sap:VirtualizedContainerService.HintSize="288,86" /> <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="310,487"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="DoWhile_1" sap:VirtualizedContainerService.HintSize="464,649" /> <sap2010:ViewStateData Id="ActivityBuilder_1" sap:VirtualizedContainerService.HintSize="504,729" /> </sap2010:ViewStateManager> </sap2010:WorkflowViewState.ViewStateManager> </Activity>0 -
Thank you so much Carmen this was very helpful! 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer