+ Reply to Thread
Results 1 to 4 of 4

Thread: Geometry editing by using Editor

  1. #1
    wei liang
    Join Date
    Apr 2010
    Posts
    137
    Points
    0
    Answers Provided
    0


    This post was helpful. Click to vote up
    0
    This post was not helpful. Click to vote down

    Default Geometry editing by using Editor

    Hi,

    I try to use the Editor to edit my feature layer (already versioned), but when I run the website, all the Editor related button are greyed out. Is there any thing I did wrong? What I did is:

    1) Add an Editor to the Grid resources:
    <esri:Editor x:Key="EditWellPadPolygon" Map="{Binding ElementName=MyMap}" LayerIDs="WetlandsDelinationArea" GeometryServiceUrl="http://gis.ursbtr.com/ArcGIS/rest/services/Geometry/GeometryServer" />

    2) Add the Feature layer to the map layers:
    <esri:FeatureLayer ID="WetlandsDelinationArea" ProxyUrl="../proxy.ashx" Url="http://ourwebsite.com/ArcGIS/rest/services/Project/EcologyMobileProjects/FeatureServer/6" AutoSave="True" ValidateEdits="True" DisableClientCaching="True" Mode="OnDemand" Opacity="0.8" Visible="False" OutFields="*" InitializationFailed="MapServices_InitializationFailed"/>

    3) Add an editing panel with all the buttons:
    <StackPanel x:Name="editSP" Orientation="Vertical" VerticalAlignment="Stretch" DataContext="{StaticResource EditWellPadPolygon}">
    <Button Command="{Binding Add}" Content="1. Add New Record" ToolTipService.ToolTip="" Margin="14,0,14,5">
    <Button.CommandParameter>
    <sys:Int32>10101</sys:Int32>
    </Button.CommandParameter>
    </Button>
    <Grid >
    <Rectangle RadiusX="4" RadiusY="4" Margin="7,1,7,1" Stroke="Olive"></Rectangle>
    <StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
    <Button Command="{Binding Select}" CommandParameter="New" Content="2. Select a Record to Delete" Margin="14,8,14,8"/>
    <Button Command="{Binding ClearSelection}" Content="Clear Selection" Margin="28,2,14,8" Visibility="Collapsed"/>
    <Button Command="{Binding DeleteSelected}" Content="Delete Selected Record" Margin="28,2,14,8" Visibility="Collapsed"/>
    </StackPanel>
    </Grid>
    <Button Command="{Binding EditVertices}" Content="3. Change a Record Shape" Margin="14,5,14,5"/>
    </StackPanel>

    Thanks,

    Wei

  2. #2
    Christopher Hill
    Join Date
    Jul 2010
    Posts
    92
    Points
    5
    Answers Provided
    1


    This post was helpful. Click to vote up
    0
    This post was not helpful. Click to vote down

    Default Re: Geometry editing by using Editor

    As far as I can tell everything looks fine, only thing you didn't provide is the map tag so that I confirm you named your map correctly. <esriMap x:Name="MyMap" >. Is editing allowed on the service? Could you paste the entire mainpage.xaml.
    .Chris
    Software Developer
    ArcGIS Silverlight/WPF API

  3. #3
    wei liang
    Join Date
    Apr 2010
    Posts
    137
    Points
    0
    Answers Provided
    0


    This post was helpful. Click to vote up
    0
    This post was not helpful. Click to vote down

    Default Re: Geometry editing by using Editor

    Thanks for your reply, Christopher. I found the problem it that I set the feature layer, which should be visible, as invisible.

    Wei

  4. #4
    Christopher Hill
    Join Date
    Jul 2010
    Posts
    92
    Points
    5
    Answers Provided
    1


    This post was helpful. Click to vote up
    0
    This post was not helpful. Click to vote down

    Default Re: Geometry editing by using Editor

    Yes, didn't see that. It will detect only visible layers.
    .Chris
    Software Developer
    ArcGIS Silverlight/WPF API

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts