|
POST
|
No problem:) It is by design that we cancel the edit when geometry is updated outside editGeometry. I've put in a work item to include current state of the geometry in the GeometryEditEventArgs. I think this was the reason you had to Stop/StartEdit.
... View more
01-11-2012
01:08 PM
|
0
|
0
|
2079
|
|
POST
|
I could not reproduce with the following SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SpatialQuery. On ExecuteCompleted event handler, I added the following code:
MyMap.ZoomTo(graphicsLayer.FullExtent);
... View more
01-10-2012
11:13 AM
|
0
|
0
|
1360
|
|
POST
|
DrawMode.Circle is still supported as shown in this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#DrawGraphics. Are you using GraphicsLayer or FeatureLayer? Kindly see the note in this library reference: http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Editor~SelectionMode.html EDIT: Actually I was able to reproduce. Thank you for reporting this bug. We'll try to get it fixed in future versions.
... View more
01-10-2012
08:51 AM
|
0
|
0
|
679
|
|
POST
|
Can you share the code that's giving you Blend error? Thanks.
... View more
01-09-2012
03:24 PM
|
0
|
0
|
938
|
|
POST
|
Here's a quick sample. Notice that to simplify, I use Graphic.PropertyChanged event and Geometry.Clone().
<Grid x:Name="LayoutRoot" Background="White">
<Grid.Resources>
<esri:SimpleFillSymbol x:Key="RedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<esri:Map x:Name="MyMap" WrapAround="True" Background="White">
<esri:ArcGISTiledMapServiceLayer ID="PhysicalTiledLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer"/>
<esri:GraphicsLayer ID="MyLayer" MouseLeftButtonDown="GraphicsLayer_MouseLeftButtonDown" Initialized="GraphicsLayer_Initialized">
<esri:GraphicsLayer.Graphics>
<esri:Graphic Symbol="{StaticResource RedFillSymbol}">
<esri:Polygon >
<esri:Polygon.Rings>
<esri:PointCollection>
<esri:MapPoint X="110.039" Y="-20.303" />
<esri:MapPoint X="132.539" Y="-7.0137" />
<esri:MapPoint X="153.281" Y="-13.923" />
<esri:MapPoint X="162.773" Y="-35.174" />
<esri:MapPoint X="133.594" Y="-43.180" />
<esri:MapPoint X="111.797" Y="-36.032" />
<esri:MapPoint X="110.039" Y="-20.303" />
</esri:PointCollection>
</esri:Polygon.Rings>
</esri:Polygon>
</esri:Graphic>
</esri:GraphicsLayer.Graphics>
</esri:GraphicsLayer>
</esri:Map>
<esri:Map x:Name="MirroredMap" Grid.Column="1" />
</Grid>
EditGeometry editGeometry;
public MainPage()
{
InitializeComponent();
editGeometry = new EditGeometry(MyMap);
editGeometry.IsEnabled = true;
MyMap.ExtentChanged += (s, e) =>
{
MirroredMap.Extent = MyMap.Extent;
};
MyMap.Layers.LayersInitialized += (s, e) =>
{
foreach (var l in MyMap.Layers)
{
if (l is ArcGISTiledMapServiceLayer)
{
MirroredMap.Layers.Add(new ArcGISTiledMapServiceLayer() { ID = l.ID, Url = (l as ArcGISTiledMapServiceLayer).Url });
}
else if (l is GraphicsLayer)
{
var graphicsLayer = new GraphicsLayer() { ID = l.ID };
if ((l as GraphicsLayer).Graphics != null)
{
foreach (var g in (l as GraphicsLayer).Graphics)
{
g.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(g_PropertyChanged);
var clonedGraphic = new Graphic() { Geometry = Geometry.Clone(g.Geometry), Symbol = g.Symbol };
foreach (var item in g.Attributes)
clonedGraphic.Attributes[item.Key] = item.Value;
graphicsLayer.Graphics.Add(clonedGraphic);
}
}
MirroredMap.Layers.Add(graphicsLayer);
}
}
};
}
void g_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == "Geometry")
{
var graphic = sender as Graphic;
var layer = MirroredMap.Layers["MyLayer"] as GraphicsLayer;
var clonedGraphic = layer.Graphics.FirstOrDefault(g => (int) g.Attributes["ObjectID"] == (int) graphic.Attributes["ObjectID"]);
clonedGraphic.Geometry = Geometry.Clone(graphic.Geometry);
}
}
private void GraphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e)
{
editGeometry.StartEdit(e.Graphic);
}
private void GraphicsLayer_Initialized(object sender, EventArgs e)
{
var l = sender as GraphicsLayer;
int i = 0;
foreach (var g in l.Graphics)
{
g.Attributes["ObjectID"] = ++i;
}
}
... View more
01-09-2012
03:17 PM
|
0
|
0
|
2079
|
|
POST
|
Sure, your code seems correct. This Editor.LayerIDs property will be applied the next time Editor.Select command becomes active.
... View more
01-09-2012
02:42 PM
|
0
|
0
|
961
|
|
POST
|
I'm not sure if you are referring to the following SDK samples: InfoWindow: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#InfoWindowSimple Renderer: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#RenderersXAML http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Thematic_Interactive
... View more
01-09-2012
08:31 AM
|
0
|
0
|
469
|
|
POST
|
The default Cyan selection color is used only when you do not override renderer. In order to preserve selection animation, your new renderer must also define selection state as in this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SelectGraphics
... View more
01-09-2012
08:26 AM
|
0
|
0
|
666
|
|
POST
|
You need to publish this as feature service first before you could use the REST end point as Url. http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/Publishing_feature_services/009300000022000000/
... View more
01-06-2012
08:57 AM
|
0
|
0
|
795
|
|
POST
|
Oh I see that's why I could not reproduce. As I've said in my earlier post, CancelEdit may be called when the API detects original geometry has changed. So if EditGeometry is active on the graphic and you update its geometry, this will trigger a CancelEdit. There is a 3.0 Beta 1 but you might still run into the same issue. So you have 2 maps that can edit and any edit on one map, you want reflected on the other map? Do you save the edit? Can the other map call layer.Update() to re-draw the graphics instead of detecting what vertex was added/moved/removed?
... View more
01-06-2012
05:31 AM
|
0
|
0
|
2079
|
|
POST
|
The error message seems to come from the first line. I believe you can replace with the following code if you define your editor inside LayoutRoot.Resources. Also LayerIDs is an array.
Dim MyEditor= TryCast(Me.LayoutRoot.Resources("MyEditorPoint"), Editor)
MyEditor.LayerIDs = New String() {EditLayer.Text}
... View more
01-06-2012
05:18 AM
|
0
|
0
|
1511
|
|
POST
|
This is related thread. Kindly see post# 3forums.arcgis.com/threads/21946-Zoom-To-Point
... View more
01-05-2012
06:34 PM
|
0
|
0
|
2269
|
|
POST
|
Kindly look at post#10 http://forums.arcgis.com/threads/19100-Silverlight-samples-from-ESRI
... View more
01-05-2012
06:30 PM
|
0
|
0
|
2374
|
|
POST
|
http://help.arcgis.com/en/webapi/silverlight/help/index.html#/FAQs/016600000009000000/
... View more
01-05-2012
06:28 PM
|
0
|
0
|
888
|
|
POST
|
It looks like Sanjay was able to fix the issue by setting DisableClientCaching to true on QueryTask. But in your case, the deleted feature remains visible on the map at the initial extent? You are using the same app to delete and view the layer, right? I do not see that happening in this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsExplicitSave.
... View more
01-05-2012
06:25 PM
|
0
|
0
|
1258
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-10-2026 12:13 PM | |
| 1 | 09-11-2025 01:30 PM | |
| 1 | 06-06-2025 10:14 AM | |
| 1 | 03-17-2025 09:47 AM | |
| 1 | 07-24-2024 07:32 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-13-2026
09:07 AM
|