Geodesic
This sample demonstrates using the ArcGIS Runtime SDK for WPF to perform the Geodesic utility methods for densification and measure on the ellipsoid.
Download Sample Application<UserControl x:Class="ArcGISWPFSDK.Geodesic" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:esri="http://schemas.esri.com/arcgis/client/2009"> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.Resources> <esri:SimpleMarkerSymbol x:Key="OriginalMarkerSymbol" Color="Red" Size="12" /> <esri:SimpleMarkerSymbol x:Key="NewMarkerSymbol" Size="8"> <esri:SimpleMarkerSymbol.Color> <RadialGradientBrush> <GradientStop Color="LightGreen" Offset="0.578"/> <GradientStop Color="#FF0E0D07" Offset="1"/> </RadialGradientBrush> </esri:SimpleMarkerSymbol.Color> </esri:SimpleMarkerSymbol> <esri:SimpleFillSymbol x:Key="ResultFillSymbol" Fill="#88000000" BorderBrush="Blue" BorderThickness="2" /> <esri:SimpleLineSymbol x:Key="ResultLineSymbol" Color="Blue" Width="2" /> <esri:SimpleLineSymbol x:Key="DrawLineSymbol" Color="Green" Width="4" /> <esri:SimpleFillSymbol x:Key="DrawFillSymbol" Fill="#3300FF00" BorderBrush="Green" BorderThickness="2" /> <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" WrapAround="True" Extent="-15000000,2000000,-7000000,8000000" Background="#FFE3E3E3" > <esri:ArcGISLocalTiledLayer ID="BaseMap" Path="..\\Data\\TPKs\\Topographic.tpk"/> <esri:GraphicsLayer ID="GeodesicResultGraphicsLayer" /> <esri:GraphicsLayer ID="VerticesGraphicsLayer" /> </esri:Map> <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10,10,10,0" > <Rectangle Fill="{StaticResource PanelGradient}" Stroke="Gray" RadiusX="10" RadiusY="10" > <Rectangle.Effect> <DropShadowEffect/> </Rectangle.Effect> </Rectangle> <Rectangle Fill="#DDFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="5,5,5,5" /> <StackPanel x:Name="DrawTools" Orientation="Vertical"> <StackPanel Orientation="Horizontal" Margin="5,5,5,0"> <Button Margin="5" Content="Draw Line" Tag="Polyline" Click="Button_Click" /> <Button Margin="5" Content="Draw Polygon" Tag="Polygon" Click="Button_Click" /> <Button Margin="5" Content="Clear" Tag="Clear" Click="Button_Click" /> </StackPanel> <Grid Margin="10,5,15,15"> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <TextBlock Text="Length: " Grid.Column="0" Grid.Row="0" Foreground="Black"/> <TextBlock Name="TextBlockLength" Grid.Column="1" Grid.Row="0" Foreground="Black"/> <TextBlock Text="Area: " Grid.Column="0" Grid.Row="1" Foreground="Black"/> <TextBlock Name="TextBlockArea" Grid.Column="1" Grid.Row="1" Foreground="Black"/> <TextBlock Text="Vertices Before: " Grid.Column="0" Grid.Row="2" Foreground="Black"/> <TextBlock Name="TextBlockVerticesBefore" Grid.Column="1" Grid.Row="2" Foreground="Black"/> <TextBlock Text="Vertices After: " Grid.Column="0" Grid.Row="3" Foreground="Black"/> <TextBlock Name="TextBlockVerticesAfter" Grid.Column="1" Grid.Row="3" Foreground="Black"/> </Grid> </StackPanel> </Grid> </Grid> </UserControl>
5/16/2014