|
POST
|
I think Post# 35 has XAML and Code-behind (see attachment), so the FeatureLayer there that is a table is not added to the map but is just associated to FeatureDataGrid by setting FDG.GraphicsLayer property.
... View more
05-30-2012
04:56 PM
|
0
|
0
|
2545
|
|
POST
|
I think this thread might also be related: http://forums.arcgis.com/threads/21714-Editing-Tables-in-Feature-Service-with-Silverlight-4. If you happen to have GraphicsLayer, this is also supported in FeatureDataGrid but if you already have FeatureLayer, that is better since metadata information on fields help FDG build its columns.
... View more
05-30-2012
10:51 AM
|
0
|
0
|
2546
|
|
POST
|
EditGeometry will allow you to UndoLastEdit/RedoLastEdit but not add a vertex. However, draw will allow you to AddVertex to a specific location and UndoLastVertex.
... View more
05-30-2012
10:46 AM
|
0
|
0
|
2304
|
|
POST
|
You can look at this thread - how to get graphic from selected row http://forums.arcgis.com/threads/46013-FeatureDataGrid-Selection-Changed-Event
... View more
05-29-2012
04:30 PM
|
0
|
0
|
734
|
|
POST
|
This is a related thread: http://forums.arcgis.com/threads/13749-how-to-Zoom-to-point
... View more
05-29-2012
04:17 PM
|
0
|
0
|
1419
|
|
POST
|
This may be because REST API does not support that type of symbology. Here's a list of supported symbols: http://sampleserver3.arcgisonline.com/ArcGIS/SDK/REST/symbol.html. Legend control will display symbols from the layer renderer, which is also limited to REST API supported symbols. The reason why ArcGISDynamicMapServiceLayer does not have a problem showing these symbols is because what you get is actually an image. You can run Fiddler, to see that the result of export request is an image.
... View more
05-29-2012
04:13 PM
|
0
|
0
|
759
|
|
POST
|
You may want to visit Concepts Page: http://help.arcgis.com/en/webapi/silverlight/help/index.html#/ArcGIS_API_for_Silverlight_overview/016600000006000000/ and Sample SDK: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm.
... View more
05-29-2012
03:53 PM
|
0
|
0
|
1049
|
|
POST
|
I'm not sure if these are what you're looking for: http://help.arcgis.com/en/webapi/WPF/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Map.html http://help.arcgis.com/en/webapi/WPF/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Map~SpatialReference.html http://help.arcgis.com/en/webapi/WPF/help/index.html#//01n70000000m000000 Basically the map's SpatialReference is set by the first layer unless you specified Map.Extent with SpatialReference.
... View more
05-24-2012
10:13 AM
|
0
|
0
|
1013
|
|
POST
|
I think you can use WCF service to send features directly to SQL. There is a blog post on sending geometry: http://blogs.esri.com/esri/arcgis/2010/03/11/sending-geometry-between-silverlight-and-the-server-using-wcf/
... View more
05-24-2012
10:08 AM
|
0
|
0
|
494
|
|
POST
|
Can you try using EditorWidget instead of GP tool to add the shape? You can create rings by performing Cut. Try to see if the order of rings is still unpredictable. If no, then maybe the GP tool is causing this? You can also try performing the query from your web browser through the REST end point. Is this off a map service or feature service? I don't know how I could help. I asked the REST API team and they also do not manipulate the order, they simply return geometry as it is returned by service. What version of ArcGIS Server do you have? I'm thinking ArcGIS Server team might be able to assist you but you also might want to contact support and give them a reproducible sample?
... View more
05-24-2012
10:03 AM
|
0
|
0
|
1196
|
|
POST
|
When using Draw, note that DrawMode=Rectangle results to e.Geometry of type Envelope. You would want to convert this to Polygon geometry first. var env = e.Geometry as Envelope; Polygon p = new Polygon() { SpatialReference = env.SpatialReference }; PointCollection ring = new PointCollection(); ring.Add(new MapPoint(env.XMin, env.YMin)); ring.Add(new MapPoint(env.XMin, env.YMax)); ring.Add(new MapPoint(env.XMax, env.YMax)); ring.Add(new MapPoint(env.XMax, env.YMin)); ring.Add(new MapPoint(env.XMin, env.YMin)); p.Rings.Add(ring); var graphic = new Graphic() { Geometry = p }; Also, you may want to call Simplify on the result geometry from Draw to ensure that the geometry is topologically correct before saving to your FeatureLayer. Editor.Add or TemplatePicker already does this for you if GeometryService has been provided (you can check this on Fiddler): http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitTemplatePicker. To call Simplify, you can look at this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Simplify
... View more
05-24-2012
09:22 AM
|
0
|
0
|
1007
|
|
POST
|
Can you check in Fiddler, the request for geometry returns the rings in the same order as you want them drawn? If the query result is already reversed then ArcGIS API for Silverlight have respected the order geometry was received. I believe REST API also does not manipulate the order. May I ask why the order of rings is important?
... View more
05-24-2012
08:58 AM
|
0
|
0
|
1196
|
|
POST
|
I think you mean to post in this forum: http://forums.arcgis.com/forums/26-ArcGIS-Mobile This is their resource page: http://resources.arcgis.com/content/arcgis-mobile/10.0/about
... View more
05-23-2012
03:44 PM
|
0
|
0
|
448
|
|
POST
|
Are you using FeatureDataGrid? If no and you are using this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify, you can update the IdentifyGrid ScrollViewer by inserting the following code: <StackPanel> <slData:DataGrid x:Name="IdentifyDetailsDataGrid" AutoGenerateColumns="False" HeadersVisibility="None" Background="White"> <slData:DataGrid.Columns> <slData:DataGridTextColumn Binding="{Binding Path=Key}" FontWeight="Bold"/> <slData:DataGridTextColumn Binding="{Binding Path=Value}"/> </slData:DataGrid.Columns> </slData:DataGrid> <slData:DataGrid x:Name="IdentifyDetailsDataGrid2" AutoGenerateColumns="False" HeadersVisibility="None" Background="White"> <slData:DataGrid.Columns> <slData:DataGridTextColumn Binding="{Binding Path=Key}" FontWeight="Bold"/> <slData:DataGridTextColumn Binding="{Binding Path=Value}"/> </slData:DataGrid.Columns> </slData:DataGrid> </StackPanel> public void ShowFeatures(List<IdentifyResult> results) { _dataItems = new List<DataItem>(); if (results != null && results.Count > 0) { IdentifyComboBox.Items.Clear(); foreach (IdentifyResult result in results) { Graphic feature = result.Feature; string title = result.Value.ToString() + " (" + result.LayerName + ")"; _dataItems.Add(new DataItem() { Title = title, Data = feature.Attributes }); IdentifyComboBox.Items.Add(title); if(result.LayerId == 3) IdentifyDetailsDataGrid.ItemsSource = feature.Attributes; else IdentifyDetailsDataGrid2.ItemsSource = feature.Attributes; } IdentifyComboBox.SelectedIndex = 0; } } Try this first and you will see that LayerId=3 is always displayed on top data grid. If this works for you, you can clean up other code and remove use of ComboBox. If you are using FeatureDataGrid, you need to put your results in 2 different GraphicsLayer. Same idea, use IdentifyResults.LayerId or LayerName to separate the results.
... View more
05-23-2012
03:38 PM
|
0
|
0
|
1421
|
|
POST
|
You should be able to update Geometry to show movement in GraphicsLayer. You can try the following code: XAML-code
xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
<Grid>
<Grid.Resources>
<esri:SimpleMarkerSymbol x:Key="MySymbol" Color="Red" Size="10" Style="Circle"/>
<esri:SimpleRenderer x:Key="MyRenderer" Symbol="{StaticResource MySymbol}"/>
</Grid.Resources>
<esri:Map x:Name="MyMap">
<esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:GraphicsLayer ID="MyGraphicsLayer" Renderer="{StaticResource MyRenderer}" />
</esri:Map>
</Grid>
C# Code-behind
public MainWindow()
{
InitializeComponent();
MyMap.Layers.LayersInitialized += (s, e) =>
{
AddGraphics();
MoveGraphics();
};
}
private void AddGraphics()
{
var layer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
double xmin = MyMap.Layers[0].FullExtent.XMin;
double ymin = MyMap.Layers[0].FullExtent.YMin;
var random = new Random();
for (int i = 0; i < 10; i++)
{
double x = xmin + (random.NextDouble() * 40000000);
double y = ymin + (random.NextDouble() * 40000000);
layer.Graphics.Add(new Graphic() { Geometry = new MapPoint(x, y) });
}
}
private void MoveGraphics()
{
var timer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(30)};
DateTime _lastOutput = DateTime.Now;
var layer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
int moveAmount = 180000;
var random = new Random();
timer.Tick += (s, e) =>
{
foreach (var g in layer.Graphics)
{
MapPoint pt = g.Geometry as MapPoint;
pt.X += (random.NextDouble() - 0.5) * moveAmount;
pt.Y += (random.NextDouble() - 0.5) * moveAmount;
}
var now = DateTime.Now;
if (now - _lastOutput > TimeSpan.FromSeconds(1))
{
_lastOutput = now;
}
};
timer.Start();
}
... View more
05-23-2012
11:14 AM
|
0
|
0
|
1013
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 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 |
a week ago
|