|
POST
|
What type of Geometry are you moving? EditGeometry only supports Polyline/Polygon. MapPoints are handled differently as in this example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsGeometry.
... View more
02-02-2012
02:25 PM
|
0
|
0
|
1156
|
|
POST
|
Sure, you can use UserToken to save any object that you want retrieved in the Completed event. For example, from this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#QueryRelatedRecords, you can add the following code. queryTask.ExecuteRelationshipQueryAsync(relationshipParameters, relationshipParameters); } } void QueryTask_ExecuteRelationshipQueryCompleted(object sender, RelationshipEventArgs e) { var rp = e.UserState as RelationshipParameter; }
... View more
02-02-2012
02:22 PM
|
0
|
0
|
1604
|
|
POST
|
You can check that when you type "<userControls:" in XAML, GraphicSource is shown in the intellisense. If it can't find it then maybe the XAML namespace declaration could be wrong. Another way to check is to put a break point on GraphicSource class, to see if it comes through there. Check the class namespace is the same as what you define for xmlns:userControls="...".
... View more
02-02-2012
02:02 PM
|
0
|
0
|
1674
|
|
POST
|
You can check what type cvs.CodedValues is. So you can change the Binding statement appropriately. This assumes CodedValues to be a Dictionary and TextBlock should show just the Value part. So when you iterate through cvs.CodedValues, do you see [1, NEW] as value?
<TextBlock Text="{Binding Value}"/>
... View more
02-02-2012
01:59 PM
|
0
|
0
|
2005
|
|
POST
|
I know, it's coming.. we are just waiting for Release team to release it. But it should be soon.. I apologize for the delay. You can also check this resource page, it should be listed here when available: http://help.arcgis.com/en/webapi/silverlight/3.0/index.html
... View more
02-02-2012
01:56 PM
|
0
|
0
|
1395
|
|
POST
|
Oh we speak different language 🙂 I usually go to http://www.developerfusion.com/tools/convert/csharp-to-vb/. Here are some Linq Samples in VB: http://msdn.microsoft.com/en-us/vstudio/bb688088. The SDK sample I linked here has a VB tab. Ideally after InitalizeComponent() you can do the VB-version of the code-snippet I sent in previous post. The idea is to create FeatureLayer (from table) in code-behind (not part of Map in XAML). Because it is not part of Map, you are responsible for calling the layer's Initialize() & Update() methods. You will still be setting FeatureDataGrid.GraphicsLayer property but no longer relying on Binding statement as in original SDK sample, instead you set this with your FeatureLayer instance. Try this out first, we can work on using GraphicsLayer+QueryTask later. FeatureLayer is essentially a combination of GraphicsLayer and QueryTask already.
... View more
02-02-2012
01:53 PM
|
0
|
0
|
2428
|
|
POST
|
You don't need to download the entire SDK, you can simply copy-paste to a new Silverlight project that points to the API assemblies. If you have already downloaded the source, then update the project references and point them to API assemblies. Here's a list of installed assemblies: http://help.arcgis.com/en/webapi/silverlight/help/index.html#/Installation/016600000005000000/. During installation you were prompted to provide install location, I think by default it is at C:\Program Files (x86)\ESRI SDKs
... View more
02-02-2012
07:32 AM
|
0
|
0
|
941
|
|
POST
|
Here's an example:
<ComboBox x:Name="choices" VerticalAlignment="Top" HorizontalAlignment="Center">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Value}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
When the layer has initialized, you have access to its LayerInfo. LayerInfo.Fields will give you domain information. Domain.CodedValues is a dictionary, so the Binding statement has been changed to show Value.
var l = new FeatureLayer() { Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/0", Where = "1=1" };
l.OutFields.Add("*");
l.Initialized += (s, e) =>
{
foreach (var f in l.LayerInfo.Fields)
{
if (f.Domain is CodedValueDomain)
{
var cvd = f.Domain as CodedValueDomain;
choices.ItemsSource = cvd.CodedValues;
break;
}
}
};
l.Initialize();
... View more
02-02-2012
07:27 AM
|
0
|
0
|
2005
|
|
POST
|
Sure, you can bind FeatureDataGrid.GraphicsLayer to a GraphicsLayer that stores results from your QueryTask. FeatureDataForm only works against FeatureLayer, so in that case you need to do the query on FeatureLayer itself. But FeatureLayer does not necessarily have to be tied to a map, as this does not make sense for tables without geometry in the data. Here's an example:You can update: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureDataGrid After removing binding statements in XAMl for FDG.Map and FDG.GraphicsLayer, they can do something like this. var l = new FeatureLayer() { Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/1", Where = "1=1" };
l.OutFields.Add("*");
MyDataGrid.GraphicsLayer = l;
l.Initialized += (s, e) => { l.Update(); };
l.Initialize();
You can update l.Where and call l.Update() (similar to running a query). When working with GraphicsLayer, you simply add features from Query_ExecuteCompleted event to your GraphicsLayer and FDG will pickup the Graphics.Attributes. Adding/removing graphics on the layer, should affect FDG. You can also apply FilterSource and do something like FDG.FilterSource = MyGraphicsLayer.Graphics.Where (g => (string) g.Attributes["status"] == "new").ToList(). Using Linq query or QueryTask, you can change the content of FDG.
... View more
02-02-2012
07:11 AM
|
0
|
0
|
2428
|
|
POST
|
We are working on including Geometry in the GeometryEditEventArgs, so you wouldn't need to call StopEdit() to get current state of geometry. These threads are probably related: http://forums.arcgis.com/threads/46679-NullReferenceException-when-using-EditGeometry, http://forums.arcgis.com/threads/46344-Graphic-disappear-on-save-edits
... View more
02-01-2012
05:34 PM
|
0
|
0
|
789
|
|
POST
|
FeatureLayer.Graphics.Count, this is not always equal to features in feature service as it depends on your FeatureLayer.Mode property. Graphics.Count only show items in your layer that may have been limited by map extent (if OnDemand) or service maxRecordCount (if SnapShot) or selected graphics (if SelectionOnly). FeatureDataGrid.GraphicsLayer.Graphics.Count should also be the same number unless FilterSource has been set.
... View more
02-01-2012
05:30 PM
|
0
|
0
|
494
|
|
POST
|
That's right, this SDK sample does not sort either: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#QueryWithoutMap. This, howeverhttp://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureDataGrid. Try using FeatureDataGrid instead of regular DataGrid.
... View more
02-01-2012
05:27 PM
|
0
|
0
|
401
|
|
POST
|
If you are using GraphicsLayer, FeatureDataGrid.Columns will be generated based on GraphicsLayer.Graphics.Attributes. If you want Query results to exclude some fields, then don't add them to your GraphicsLayer.Graphics.Attributes. Something like this:
foreach (var f in args.FeatureSet.Features)
{
var g = new Graphic() { Geometry = Geometry.Clone(f.Geometry) };
foreach (var a in f.Attributes)
if(a.Key != "FieldToExclude")
g.Attributes[a.Key] = a.Value;
l.Graphics.Add(g);
}
... View more
02-01-2012
05:20 PM
|
0
|
0
|
2104
|
|
POST
|
This blog might help: http://whydoidoit.com/2010/08/30/debug-xaml-element-is-already-the-child-of-another-element/
... View more
02-01-2012
05:18 PM
|
0
|
0
|
554
|
|
POST
|
Please use ScaleLine instead: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Scaleline.
... View more
02-01-2012
05:15 PM
|
0
|
0
|
941
|
| 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 |
a month ago
|