This is related thread: http://forums.arcgis.com/threads/24340-About-Editor_EditCompleted-...
Thanks for your reply. But it is not just that .I want to do more. For example:I obtain one Feature from the FeatureLayer T2 by Selecting. Then I want to change its location and attributes. But it can not work. the codes were run, but when I update(refresh) the map, the location have not changed. Would you please give some advance about this. Thanks again. Graphic g = T2.SelectedGraphics.ToList()[0]; MapPoint mp = g.Geometry as MapPoint; Console.WriteLine("description: {0}", g.Attributes["description"]); Console.WriteLine("x: {0}, y: {1}", mp.X, mp.Y); mp.X = mp.X + 100; mp.Y = mp.Y + 50; g.Attributes["description"] = "y23z"; T2.SaveEdits(); //T2.Update();
I think you are talking about this: <Grid.Resources> <esri:Editor x:Key="MyEditor" Map="{Binding ElementName=MyMap}" LayerIDs="ThreatAreas" GeometryServiceUrl="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" /> </Grid.Resources> You are right. WPF does not like this binding statement under resources. In WPF, you can delete the line in red and set its Map property in code-behind: Editor editor = this.LayoutRoot.Resources["MyEditor"] as Editor; editor.Map = this.MyMap; This is related thread: http://forums.arcgis.com/threads/26130-WPF-vs-Silverlight
<Grid.Resources> <esri:Editor x:Key="MyEditor" Map="{Binding ElementName=MyMap}" LayerIDs="ThreatAreas" GeometryServiceUrl="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" /> </Grid.Resources>
Editor editor = this.LayoutRoot.Resources["MyEditor"] as Editor; editor.Map = this.MyMap;
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.