|
POST
|
This is expected behavior. You can use the following sample to test. Pan the map and draw the polygon using Add button. Click Zoom to zoom to full extent. Check Normalize and click the graphic to update the geometry. Click zoom to full extent again. Notice that when you update the geometry and the polygon is split in half, the extent changes.
<Grid x:Name="LayoutRoot">
<Grid.Resources>
<esri:SimpleFillSymbol x:Key="RedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:Editor x:Key="MyEditor" Map="{Binding ElementName=MyMap}" EditCompleted="Editor_EditCompleted"/>
</Grid.Resources>
<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="MyGraphicsLayer" MouseLeftButtonDown="GraphicsLayer_MouseLeftButtonDown" />
</esri:Map>
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Center">
<Button Content="Add" DataContext="{StaticResource MyEditor}"
Command="{Binding Add}" CommandParameter="{StaticResource RedFillSymbol}"/>
<Button Content="Zoom" Click="Button_Click"/>
<CheckBox x:Name="NormalizeGeometry" Content="Normalize" IsChecked="False"/>
</StackPanel>
</Grid>
private void Button_Click(object sender, RoutedEventArgs e)
{
var l = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
MyMap.ZoomTo(l.FullExtent);
}
private void Editor_EditCompleted(object sender, Editor.EditEventArgs e)
{
if (e.Action == Editor.EditAction.Add)
{
foreach (var edit in e.Edits)
edit.Graphic.Attributes["OriginalGeometry"] = edit.Graphic.Geometry;
}
}
private void GraphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e)
{
var originalGeometry = e.Graphic.Attributes["OriginalGeometry"] as Polygon;
if (NormalizeGeometry.IsChecked.HasValue && NormalizeGeometry.IsChecked.Value)
e.Graphic.Geometry = Geometry.NormalizeCentralMeridian(originalGeometry);
else
e.Graphic.Geometry = originalGeometry;
}
... View more
12-20-2011
09:40 AM
|
0
|
0
|
1417
|
|
POST
|
Yes, FeatureLayer.UndoEdits() is supported in v2.2 http://help.arcgis.com/en/webapi/silverlight/2.2/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~UndoEdits.html. Note, however that in order to have a chance to undo edits, FeatureLayer.AutoSave must be False. Otherwise, all edits (geometry or attribute) will be committed and saved to the server immediately.
... View more
12-20-2011
08:54 AM
|
0
|
0
|
1170
|
|
POST
|
I'm not sure which widget you are talking about. Do you have a sample? Or are you referring to this SDK sample? Using IdentifyTask: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify
... View more
12-20-2011
08:49 AM
|
0
|
0
|
488
|
|
POST
|
The following links might help: Client-access policy error: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2009/08/24/Troubleshooting-blank-layers.aspx Download proxy page: http://help.arcgis.com/en/webapi/silverlight/help/index.html#/Secure_services/016600000022000000/ You can also try this small sample that was adapted from this SDK Sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#WmsLayerSimple
xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
<Grid x:Name="LayoutRoot" Background="White">
<esri:Map x:Name="MyMap" WrapAround="True" Extent="-15000000,2000000,-7000000,8000000">
<esri:ArcGISTiledMapServiceLayer
Url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
</esri:Map>
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Center">
<Button Content="Add WMS" Click="Button_Click"/>
<ListBox x:Name="LayerList" SelectionMode="Multiple" SelectionChanged="LayerList_SelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</Grid>
private void Button_Click(object sender, RoutedEventArgs e)
{
var wmsLayer = new WmsLayer()
{
ID="MyWmsLayer",
Url = "http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi",
ProxyUrl = "http://serverapps.esri.com/SilverlightDemos/ProxyPage/proxy.ashx",
SkipGetCapabilities = false,
Version = "1.1.1",
Opacity = 0.7,
//Layers =new string[]{ "nexrad-n0r"}
};
wmsLayer.Initialized += (a, b) =>
{
LayerList.ItemsSource = (a as WmsLayer).LayerList;
};
MyMap.Layers.Add(wmsLayer);
}
private void LayerList_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var layerList = new List<string>();
var wmsLayer = MyMap.Layers["MyWmsLayer"] as WmsLayer;
if (wmsLayer.Layers != null)
{
foreach (var l in wmsLayer.Layers)
layerList.Add(l);
}
if (e.AddedItems != null)
{
foreach(var item in e.AddedItems)
{
var info = item as WmsLayer.LayerInfo;
layerList.Add(info.Name);
}
}
if (e.RemovedItems != null)
{
foreach (var item in e.RemovedItems)
{
var info = item as WmsLayer.LayerInfo;
layerList.Remove(info.Name);
}
}
wmsLayer.Layers = layerList.ToArray();
}
... View more
12-20-2011
07:39 AM
|
0
|
0
|
2192
|
|
POST
|
We have and we currently are not finding issues with Silverlight 5. Please let us know if you encounter any issues as we are in the process of evaluating this as well. Thank you.
... View more
12-19-2011
01:51 PM
|
0
|
0
|
607
|
|
POST
|
You might want to check EditAction (i.e. e.Editor.EditAction.Add), your code currently will set the attribute regardless of completed command. If this is not a concern, you can also use FeatureLayer.BeginSaveEdits event, if any edit should trigger this attribute value change. Another option is to update your service-defined PrototypeAttributes. EditorWidget contains TemplatePicker that allows you to add features based on feature type. Based on the selected feature type, a list of default attributes are used. This may be related thread: http://forums.arcgis.com/threads/46116-Template-Picker-and-Multiple-Domain-Values-2.3-and-10-SP3
... View more
12-19-2011
01:48 PM
|
0
|
0
|
833
|
|
POST
|
Yes, you can use 2nd parameter UserState, this can be any data type, which you can cast to the correct type in the completed event.
geometryService.AreasAndLengthsCompleted += (s, e) =>
{
var originalGraphics = e.UserState as List<Graphic>;
if (originalGraphics != null)
{
};
};
geometryService.AreasAndLengthsAsync(graphics, graphics);
... View more
12-19-2011
01:30 PM
|
0
|
0
|
804
|
|
POST
|
The only client-side calculation the API offers for finding intersection is in Envelope geometry which may not be as accurate as you need it to be when finding interesection between Polylines. The other option would be to use GeometryService.Intersect.
... View more
12-19-2011
12:58 PM
|
0
|
0
|
1322
|
|
POST
|
This is related thread: http://forums.arcgis.com/threads/2300-System.Runtime.Serialization-Version This MSDN doc might help understanding x:Class http://msdn.microsoft.com/en-us/library/cc189082%28v=vs.95%29.aspx
... View more
12-19-2011
12:14 PM
|
0
|
0
|
1715
|
|
POST
|
You have not set WmsLayer.VisibleLayers property, this may be why you are seeing blank layer. If this property will be set based on ListBox.SelectedItems, you should handle that in your code and convert ObservableCollection<wmsTitelName> to string [] with visible layer names.
... View more
12-19-2011
12:05 PM
|
0
|
0
|
2192
|
|
POST
|
If you are using API version 2.3 or 3.0 Beta 1, you can use this method: http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Geometry.Geodesic~Area.html.
... View more
12-19-2011
11:37 AM
|
0
|
0
|
804
|
|
POST
|
You can use GeometryService.Intersect() http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Intersect
... View more
12-16-2011
02:34 PM
|
0
|
0
|
1322
|
|
POST
|
Does your Graphic.Symbol have a select state? (See SelectLineSymbol in XAML-code) http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SelectGraphics. You can use MouseLeftButtonDown to select graphic. If you have successfully added different graphics that make continuous line, during selection, only a segment of the line will be selected.
... View more
12-16-2011
02:13 PM
|
0
|
0
|
650
|
|
POST
|
If FeatureLayer.AutoSave is True (this is default setting), FeatureLayer.SaveEdits() will not have any bearing in your app since edits are committed (submitted to server) immediately. If you want to make saving explicit, set AutoSave=False. You don't have much control over FeatureDataForm from EditorWidget though. Instead you can use FeatureDataForm outside EditorWidget: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitFeatureDataForm. You can subscribe to FeatureDataForm.EndEdits instead of Graphic.AttributeValueChanged. EndEdits fires when apply button is clicked. You can call layer.SaveEdits() then.
... View more
12-16-2011
12:07 PM
|
0
|
0
|
708
|
|
POST
|
Have you checked this SDK sample? http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SpatialQuery. Kindly run Fiddler with your app and check to see what geometry is sent, does it include SpatialReference?
... View more
12-16-2011
12:01 PM
|
0
|
0
|
536
|
| 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
|