|
POST
|
Actually, you are not the first to ask this question 🙂 This is related thread http://forums.arcgis.com/threads/11385-sublayer-List-display?highlight=visiblelayers+dynamic
... View more
02-24-2011
11:11 AM
|
0
|
0
|
812
|
|
POST
|
Have you looked at the Draw sample here: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#DrawGraphics and MeasureAction sample here: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#UtilityActions? Are you trying to do both or are you saying that the Draw in MeasureAction takes multiple clicks before second point is drawn? This behavior does not seem reproducible with the two samples above. So you might need to check your application logic, maybe something in there disables the draw. Also, the published website should not be any different as what you see in Debug mode if they both point to the same Silverlight application.
... View more
02-24-2011
11:02 AM
|
0
|
0
|
858
|
|
POST
|
I cannot replicate the issue with v2.1 and up. When I make a selection on multiple layers using Editor.Select. Editor.EditCompleted event is fired once for EditAction.Select, regardless if my selection includes features from both layers. I confirmed this using the following code:
private void Editor_EditCompleted(object sender, Editor.EditEventArgs e)
{
if (e.Action == Editor.EditAction.Select)
foreach (var edit in e.Edits)
System.Diagnostics.Debug.WriteLine(edit.Layer.ID);
}
And it my Output window, I see both layer IDs. I also placed a breakpoint on EditCompleted to see if I'll hit it for an EditAction.Cancel, but I didn't. What version of the API are you using? You are noticing that EditAction.Cancel is fired after Editor.EditAction.Select when you have more than one layer?
... View more
02-24-2011
10:51 AM
|
0
|
0
|
1970
|
|
POST
|
Are you using the same url? http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer. This seems to be a broken link and might be what causes the issue? Also the version of http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis seem updated to 10.01.
... View more
02-23-2011
02:51 PM
|
0
|
0
|
2058
|
|
POST
|
I cannot replicate the issue with a secured 10 SP1 service. Are you using Silverlight or WPF? If you are using WPF, you need to supply Credentials property to your ArcGISDynamicMapServiceLayer.
... View more
02-23-2011
02:47 PM
|
0
|
0
|
2067
|
|
POST
|
You are right, there is no event raised when MeasureAction is complete. If you notice in the SDK sample, measure is completed when a DoubleClick is detected. This is when graphics are cleared from the map, which might be a good time to re-enable the pan cursor.
Point lastClick;
private void Map_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Point pt = e.GetPosition(null);
if (Math.Abs(pt.X - lastClick.X) < 2 && Math.Abs(pt.Y - lastClick.Y) < 2)
{
//TODO: change cursor here
}
lastClick = pt;
}
... View more
02-23-2011
02:38 PM
|
0
|
0
|
1096
|
|
POST
|
You can look at this MSDN sample: http://msdn.microsoft.com/en-us/library/system.windows.visualstatemanager(v=vs.95).aspx
... View more
02-23-2011
02:24 PM
|
0
|
0
|
781
|
|
POST
|
We also are not aware of ETA for v2.2, we just know that it may be soon:) From dev team, it goes through a series of approval and processing from other teams so potential due date is hard to tell.
... View more
02-23-2011
02:18 PM
|
0
|
0
|
1346
|
|
POST
|
When you are updating DataTemplate of any control, the template applies for all entries. There is no special case handling that will do as you have described where a different template is used for layers with only one symbol and another template for more than one symbols. You will find that in the SDK sample, that each layer regardless of the symbol count follow the same DataTemplate.
... View more
02-23-2011
10:22 AM
|
0
|
0
|
1077
|
|
POST
|
Have you tried subscribing to Map.Progress event? And no intermediate progress is reported here? Just 0 and 100?
... View more
02-23-2011
10:03 AM
|
0
|
0
|
1619
|
|
POST
|
You can try to perform animation using VisualStates.
... View more
02-23-2011
09:59 AM
|
0
|
0
|
781
|
|
POST
|
You can look at the following Microsoft documentation about animation in WPF http://msdn.microsoft.com/en-us/library/bb613592.aspx. Animating 2000 features is expected to slow down your application. You can google about Hardware Acceleration for WPF, this might help improve performance.
... View more
02-23-2011
09:56 AM
|
0
|
0
|
2254
|
|
POST
|
Does it hit this line? Application.Current.MainWindow.Dispatcher.Invoke(new NullDelegate(Update), null); I think the best way to find the parent of your Map control is to use VisualTreeHelper. If you do this in while loop until GetParent() returns null, you will have the Visual root and use its Dispatcher. Something like this if Map is not a descendant of your Application.Current.MainWindow:
DependencyObject dependencyObject = VisualTreeHelper.GetParent(element);
if (dependencyObject == null)
return element;
while (VisualTreeHelper.GetParent(dependencyObject) != null)
dependencyObject = VisualTreeHelper.GetParent(dependencyObject);
rootVisual = dependencyObject as Visual;
You will be able to then use rootVisual.Dispatcher.
... View more
02-23-2011
09:38 AM
|
0
|
0
|
1491
|
|
POST
|
If you plan on adding layers dynamically and need all GraphicsLayers and FeatureLayers from your Map.Layers to use the same Editor, it is sufficient to supply only Editor.Map property. If you wish to include or exclude some layers, you can also supply the Editor.LayerIds property. Actually in the sample link you provided.. if you are using WPF, setting Editor.Map property through Element binding is not supported.
<esri:Editor x:Key="MyEditor" Map="{Binding ElementName=MyMap}" LayerIDs="CensusDemographics" SelectionMode="Rectangle" ContinuousMode="True" />
You need to set this property in code-behind:
Editor editor = this.LayoutRoot.Resources["MyEditor"] as Editor;
editor.Map = this.MyMap;
You can still use LayerIDs property if you wish to include only specific layers from your map. When you create the layer in code-behind, you just need to set ID property to match this. For example
FeatureLayer l = new FeatureLayer()
{
ID = "CensusDemographics",
Url = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0"
};
MyMap.Layers.Add(l);
... View more
02-23-2011
09:28 AM
|
0
|
0
|
969
|
|
POST
|
I believe you can use IsolatedStorage to save your pre-defined bookmarks. If you use the same key "ESRI.ArcGIS.Client.Toolkit.BookMarks" and store the same object MapBookmark. You can look at LoadBookmarks() and SaveBookmarks() methods when you download source code for Bookmark from the Toolkit in CodePlex http://esrisilverlight.codeplex.com/ to have an understanding of what you need to do in order to populate your pre-defined bookmarks.
... View more
02-23-2011
09:16 AM
|
0
|
0
|
479
|
| 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
|