|
POST
|
Do you mean interpolate color of graphic symbols in your map? If yes you can refer to these samples: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#TemporalRendererPoints http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#TemporalRendererTracks Note TemporalRenderer.SymbolAger in above samples use RampInterpolator by Opacity, this can also been done by Color. http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.RampInterpolator.html
... View more
02-18-2011
09:36 AM
|
0
|
0
|
1403
|
|
POST
|
This is related thread: http://forums.arcgis.com/threads/4063-Select-Features-from-ArcGISDynamicMapServiceLayer
... View more
02-18-2011
09:26 AM
|
0
|
0
|
1251
|
|
POST
|
Please go through this blog post for troubleshooting blank layers http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2009/08/24/Troubleshooting-blank-layers.aspx. Fiddler might be able to tell us whether a web request for that layer was sent or not and if any failure had occurred.
... View more
02-18-2011
09:21 AM
|
0
|
0
|
1942
|
|
POST
|
Why would you set ListBox ItemSource inside the ForEach? The ForEach is meant to iterate through the results. results already contains the grouped graphic collection. The following line can be done before or after the ForEach but not inside it. Results.ItemsSource = results Also if you are updating the ItemsSource with different type of elements, you need to update your Binding statement in XAML as the following no longer apply after you set ItemsSource to results.
<TextBlock Text="{Binding Attributes[Officer]}"/>
<TextBlock Text="{Binding Attributes[Incident]}" Grid.Column="2"/>
Previously when it was set to graphicCollection, the contents are graphics with Attributes that has key Officer and Incidents. 'results' on the other hand, is formed by an Anonymous Type Select, with new properties Officer and Incidents.
<TextBlock Text="{Binding Officer}"/>
<TextBlock Text="{Binding Incidents}" Grid.Column="2"/>
Binding to anonymous types is supported in SL4 by adding this line in your AssemblyInfo.cs
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.Windows")]
When you don't see elements in your ListBox, check Binding statements if they still apply to the data type of your ItemsSource.
... View more
02-18-2011
09:16 AM
|
0
|
0
|
1399
|
|
POST
|
It is possible. You just need to modify the DataTemplate of your InfoWindow. Or you can also create a UserControl that contains the IdentifyGrid and use it as your maptip. You may also need to update Binding statements and/or DataContext of your control.
... View more
02-18-2011
08:55 AM
|
0
|
0
|
2056
|
|
POST
|
Ahh, you mean you want the results displayed in certain order according to their field names (not their values), where if results came back with Cell > Name > Number, you want to change the order to Number > Name > Cell. In this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify, you need to modify ShowFeatures() where Data can no longer be set directly to feature.Attributes. Without any change to this sample, click on Denver. For simplicity let's look at only 3 fields. Notice the order of these 3 fields: ObjectID > NAME > STATE_NAME. If you want to change the order in which they appear, you will need something like this to force them to be in a certain order.
private IDictionary<string, object> OrderedAttributes(IDictionary<string, object> source)
{
IDictionary<string, object> result = new Dictionary<string, object>();
List<string> orderedFields = new List<string>() { "STATE_NAME", "NAME", "ObjectID" };
foreach (var f in orderedFields)
{
if (source.ContainsKey(f))
{
var item = source ;
result.Add(f, item);
}
}
return result;
}
... View more
02-18-2011
08:48 AM
|
0
|
0
|
898
|
|
POST
|
You can look at this blog post: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2009/08/31/Using-services-across-schemes.aspx. This help doc might also be useful for starters: http://help.arcgis.com/en/webapi/silverlight/help/index.html#/Getting_Started/016600000004000000/
... View more
02-18-2011
08:06 AM
|
0
|
0
|
4004
|
|
POST
|
Do you mean showing distance between vertices as in this example?http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#UtilityActions If not, can you provide a sample from JavaScript API so I can point you to the right direction? Thanks 🙂
... View more
02-18-2011
08:03 AM
|
0
|
0
|
1154
|
|
POST
|
Snapping is demonstrated in any of our Editing samples that use EditVertices command. You can look at this sample for Default behavior: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsExplicitSave and this sample for Customized behavior: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsAutoSave In the second sample the following properties are set on the map: esri:Editor.SnapDistance="20" esri:Editor.SnapKey="S" The default values are SnapDistance of 15 pixels and SnapKey is CTRL. While EditVertices command is active, you drag a vertex while pressing on SnapKey and it will try to snap to vertices of other graphics that is within the given SnapDistance proximity. As for extrusion, Do you mean extrude polygon in 3D as described here: http://webhelp.esri.com/arcgisdesktop/9.3/tutorials/3D_analyst/3D_9_5.htm We currently do not support 3D.
... View more
02-18-2011
08:01 AM
|
0
|
0
|
1211
|
|
POST
|
I was able to reproduce this with IE8 on my machine but not with Google Chrome on the same machine. If you have Google Chrome or FireFox installed, can you try to do the download from those browsers? Another colleague tried on his IE8 and he was able to download templates fine without error. We are still trying to figure out what causes the download to fail. On Fiddler, there's no report of any error when the message box comes up.
... View more
02-18-2011
07:37 AM
|
0
|
0
|
695
|
|
POST
|
You can refer and modify this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify You can extend the scope of identifyTask by making it a private member of the class and subscribe to its ExecuteCompleted and Failed events upfront. You can also create a Stack or Queue of the map services Url.
identifyTask = new IdentifyTask();
identifyTask.ExecuteCompleted += IdentifyTask_ExecuteCompleted;
identifyTask.Failed += IdentifyTask_Failed;
mapServices = new Stack<string>();
UpdateMapServices(); //TODO: push or enqueue map service URL's
In the MouseClick, you can simply update the Url property of IdentifyTask and then pass identifyParams as UserState to your IdentifyTask so you can re-use it for the other map services.
identifyTask.Url = mapServices.Pop();
identifyTask.ExecuteAsync(identifyParams, identifyParams);
In the ExecuteCompleted, you can call the succeeding Execute this way:
if (mapServices.Count == 0)
UpdateMapServices(); //to re-add the map services for the next click event
else
{
identifyTask.Url = mapServices.Pop();
IdentifyParameters identifyParams = args.UserState as IdentifyParameters;
identifyTask.ExecuteAsync(identifyParams, identifyParams );
}
Your task then is to update the UIElement. Notice that ShowFeatures() clears _dataItems and IdentifyComboBox so everytime new result comes back, the IdentifyResultGrid is cleared. You need to change this so that it can display results from all services.
... View more
02-17-2011
12:22 PM
|
0
|
0
|
2176
|
|
POST
|
As for the e.Cancel on BeginSaveEdits, this is a related thread: http://forums.arcgis.com/threads/20915-I-set-BeginEditEventArgs.Cancel-true-but-edits-get-saved-anyway For workaround, you can set FeatureLayer AutoSave to False, perform your check on EditEnded and explicitly call SaveEdits(). Are you using TemplatePicker to add features? If yes, TemplatePicker also has EditCompleted event.
t.EditCompleted += (s, e) =>
{
if (e.Action == Editor.EditAction.Add)
{
foreach (var edit in e.Edits)
{
Graphic g = edit.Graphic;
bool requiredFieldSupplied = true;
foreach (var item in g.Attributes)
{
//TODO: check required field is not null
if (item.Key == "MyRequiredFieldName" && item.Value == null)
{
requiredFieldSupplied = false;
break;
}
}
FeatureLayer l = edit.Layer as FeatureLayer;
if (requiredFieldSupplied)
l.SaveEdits();
else
MessageBox.Show("MyRequiredFieldName cannot be null");
}
}
};
... View more
02-17-2011
11:49 AM
|
0
|
0
|
1550
|
|
POST
|
You can have a lookup dictionary that holds a list of non-nullable fields per layer. Dictionary<string, List<Field>> lookup = new Dictionary<string, List<Field>>(); For each layer's Initialized event:
FeatureLayer l = sender as FeatureLayer
var nonNullableFields = new List<Field>();
foreach (var f in l.LayerInfo.Fields)
{
if (!f.Nullable)
nonNullableFields.Add(f);
}
lookup.Add(l.LayerInfo.Name, nonNullableFields);
If your FeatureLayer's AutoSave is False, you can explicitly call SaveEdits() in FeatureDataForm's EditEnded. This should allow you to perform validation check before saving the edits.
void f_EditEnded(object sender, EventArgs e)
{
FeatureDataForm f = sender as FeatureDataForm;
FeatureLayer l = f.FeatureLayer;
Graphic g = f.GraphicSource;
var nonNullableFields = lookup[l.LayerInfo.Name];
foreach (var item in g.Attributes)
{
if (ContainsField(item.Key, nonNullableFields) && item.Value == null)
throw new Exception(string.Format("Field '{0}' cannot be null", item.Key));
}
l.SaveEdits();
}
private bool ContainsField(string name, List<Field> fields)
{
foreach (var f in fields)
if (name == f.Name) return true;
return false;
}
... View more
02-17-2011
09:07 AM
|
0
|
0
|
1550
|
|
POST
|
Can you run Fiddler with your WPF application? It would be nice if you can monitor the webrequests and see where it got stuck. Maybe some requests lost packets or timed out.
... View more
02-17-2011
08:47 AM
|
0
|
0
|
505
|
|
POST
|
I asked a colleague from our team who is more fluent in VB than I am and he converted the C# sample to VB. Kindly see attached. It is just a short sample that demonstrates how you can use Linq for the use case that you described.
... View more
02-17-2011
08:47 AM
|
0
|
0
|
1399
|
| 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
|