Highlighting
I can't seem to get any highlight to work with a workflow on Silverlight viewer v1.7
I've use the "RunExternalCommand" to create, select, and highlight
CreateHighlightLayer
SetActiveHighlightLayer
HighlightEsriFeatureSet
The workflow runs fine, and it ends up zooming to the selections found, but it doesn't display anything. Is there some way i have to activate highlights or am i missing something?
-
here's the XAML text if it helps.
<Activity mc:Ignorable="sap" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="392,1037" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client" xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core" xmlns:gcx="http://apis.geocortex.com/2009" xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi" xmlns:gfci="clr-namespace:Geocortex.Forms.Client.Items;assembly=Geocortex.EssentialsWpfApi" xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting" xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow" xmlns:gwa1="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:s="clr-namespace:System;assembly=System.Core" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=mscorlib" xmlns:s3="clr-namespace:System;assembly=System.ServiceModel" xmlns:s4="clr-namespace:System;assembly=System.Drawing.Design" xmlns:s5="clr-namespace:System;assembly=System.Design" xmlns:s6="clr-namespace:System;assembly=System.Web.Services" xmlns:s7="clr-namespace:System;assembly=System.AddIn" xmlns:s8="clr-namespace:System;assembly=System.ComponentModel.Composition" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:sw="clr-namespace:System.Windows;assembly=WindowsBase" xmlns:sw1="clr-namespace:System.Windows;assembly=PresentationFramework" xmlns:sw2="clr-namespace:System.Windows;assembly=PresentationCore" xmlns:swt="clr-namespace:System.Windows.Threading;assembly=WindowsBase" xmlns:swt1="clr-namespace:System.Windows.Threading;assembly=System.Windows.Presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Sequence sap:VirtualizedContainerService.HintSize="352,997" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Default="<My Parcel URL>" Name="_parcelQueryURL" />
<Variable x:TypeArguments="esri:FeatureSet" Name="selectionSet" />
<Variable x:TypeArguments="esri:Geometry" Name="selection" />
<Variable x:TypeArguments="x:String" Default="<My token here>" Name="_token" />
<Variable x:TypeArguments="esri:SpatialReference" Name="SpatialReference" />
<Variable x:TypeArguments="x:String" Name="_mapServiceID" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg1:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg1:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<gwa1:GetMapInfo Height="{x:Null}" Scale="{x:Null}" Width="{x:Null}" sap:VirtualizedContainerService.HintSize="330,151" SpatialReference="[SpatialReference]" />
<gwa1:DisplayCaptureGeometry CaptureTypes="{x:Null}" GraphicsLayerName="{x:Null}" GeometryRequired="True" sap:VirtualizedContainerService.HintSize="330,49" Message="Please make a selection" RequiredMessage="Please draw geometry on the map" Result="[selection]" ShowCapturedGeometry="False" ShowCapturedMessage="True" Title="Select Features" WorkflowContainerName="Default">
<gwa1:DisplayCaptureGeometry.Buttons>
<gcx:FormButton CausesValidation="False" IsDefault="False" Label="Ok" Value="Ok" />
</gwa1:DisplayCaptureGeometry.Buttons>
<gwa1:DisplayCaptureGeometry.CaptureTypesPlaceholder>
<scg1:List x:TypeArguments="gwa1:GeometryCaptureType" Capacity="4">
<gwa1:GeometryCaptureType>Extent</gwa1:GeometryCaptureType>
<gwa1:GeometryCaptureType>Polygon</gwa1:GeometryCaptureType>
<gwa1:GeometryCaptureType>MapPoint</gwa1:GeometryCaptureType>
<gwa1:GeometryCaptureType>Polyline</gwa1:GeometryCaptureType>
</scg1:List>
</gwa1:DisplayCaptureGeometry.CaptureTypesPlaceholder>
<sap:WorkflowViewStateService.ViewState>
<scg1:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg1:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</gwa1:DisplayCaptureGeometry>
<gwa1:QueryTask Geometry="[selection]" sap:VirtualizedContainerService.HintSize="330,227" QueryServiceUrl="[_parcelQueryURL]" Results="[selectionSet]" ReturnGeometry="True" SpatialRelationship="esriSpatialRelIntersects" Token="[_token]" />
<gwa1:RunExternalCommand CommandName="CreateHighlightLayer" CommandParameter="["highlightLayer"]" sap:VirtualizedContainerService.HintSize="330,82" />
<gwa1:RunExternalCommand CommandName="SetActiveHighlightLayer" CommandParameter="["highlightLayer"]" sap:VirtualizedContainerService.HintSize="330,82" />
<gwa1:RunExternalCommand CommandName="HighlightEsriFeatureSet" CommandParameter="[selectionSet]" sap:VirtualizedContainerService.HintSize="330,82" />
</Sequence>
</Activity>0 -
I found the culprit. after debugging everything imaginable.. I found our my rest service was broken. Regardless of if i asked for a query to return the geometry it would not, returning only the fields. I had to recreate and republish my rest service (double checking it was still returning the geometry along the way) and it works now. It was a strange case since it appeared to be working, there were no errors being displayed, it was just as if the "returnGeometry" flag was stuck on false.
Hope this can help out someone else in the long run!
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer