Intersect Online
This sample demonstrates using an ESRI.ArcGIS.Client.Tasks GeometryService that takes an input polygon that cuts across another existing polygons in a GraphicsLayer to return the intersection between the two polygons that are filled with random colors.
To use the sample, add a polygon that intersects a portion of the parcel features. Intersecting portions of features are displayed in random colors.
Download Sample Application<UserControl x:Class="ArcGISWPFSDK.Intersect" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:esri="http://schemas.esri.com/arcgis/client/2009"> <Grid x:Name="LayoutRoot"> <Grid.Resources> <esri:SimpleFillSymbol x:Key="BlueFillSymbol" Fill="#990000FF" BorderBrush="Blue" /> <esri:SimpleFillSymbol x:Key="CyanFillSymbol" Fill="#9900FFFF" BorderBrush="Cyan"/> <LinearGradientBrush x:Key="PanelGradient" EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform CenterY="0.5" CenterX="0.5"/> <SkewTransform CenterY="0.5" CenterX="0.5"/> <RotateTransform Angle="176" CenterY="0.5" CenterX="0.5"/> <TranslateTransform/> </TransformGroup> </LinearGradientBrush.RelativeTransform> <GradientStop Color="#FF145787" Offset="0.16"/> <GradientStop Color="#FF3D7FAC" Offset="0.502"/> <GradientStop Color="#FF88C5EF" Offset="0.984"/> </LinearGradientBrush> </Grid.Resources> <esri:Map x:Name="MyMap" Extent="-83.3188395774275,42.61428312652851,-83.31295664068958,42.61670913269855" > <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" /> <esri:GraphicsLayer ID="ParcelsGraphicsLayer" Opacity="0.3" /> <esri:GraphicsLayer ID="IntersectGraphicsLayer" /> </esri:Map> <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" > <Rectangle Fill="{StaticResource PanelGradient}" Stroke="Gray" RadiusX="10" RadiusY="10" Margin="0,0,0,5" > <Rectangle.Effect> <DropShadowEffect/> </Rectangle.Effect> </Rectangle> <Rectangle Fill="#FFFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,15" /> <StackPanel Orientation="Vertical" Margin="30,20,20,30"> <TextBlock x:Name="ResponseTextBlock" Text="Add a polygon that intersects a portion of the parcel features. Intersecting portions of features are displayed in random colors. " Width="200" TextAlignment="Left" TextWrapping="Wrap" Foreground="Black"/> <Button HorizontalAlignment="Center" Width="130" Content="Reset" Click="Button_Click" Margin="5" /> </StackPanel> </Grid> </Grid> </UserControl>
5/16/2014