|
POST
|
Can you subscribe to UpdateCompleted event and then check each graphic attribute LEASELEFT? If this value is null, make sure that OutFields in the FeatureLayer include this attribute. Otherwise, check the data type, make sure it matches your UniqueValueInfo.Value. It's actually good that your UniqueValueRenderer.DefaultSymbol is now used. You just need to find out why the UniqueValueInfo.Symbol is not picked up. The symbol should also be fitting for the geometry type. Since you are using SimpleFillSymbol, the features must be polygon geometry.
... View more
02-10-2011
04:30 PM
|
0
|
0
|
2233
|
|
POST
|
Yes, the API is backwards compatible. If there were any breaking change, they will be noted in this section of our SDK http://help.arcgis.com/en/webapi/silverlight/help/index.html#/What_s_new_in_2_1/016600000025000000/
... View more
02-10-2011
04:23 PM
|
0
|
0
|
3643
|
|
POST
|
I cannot replicate the same issue you are seeing with the following short sample:
private void GraphicsLayer_Initialized(object sender, EventArgs e)
{
GraphicsLayer l = sender as GraphicsLayer;
Graphic gr = new Graphic();
gr.Attributes["Distance"] = 2.3;
l.Graphics.Add(gr);
gr = new Graphic();
gr.Attributes["Distance"] = 4.0;
l.Graphics.Add(gr);
gr = new Graphic();
gr.Attributes["Distance"] = 2.3;
l.Graphics.Add(gr);
gr = new Graphic();
gr.Attributes["Distance"] = 3.2;
l.Graphics.Add(gr);
gr = new Graphic();
gr.Attributes["Distance"] = 1.0;
l.Graphics.Add(gr);
var sortedGraphics = from g in l.Graphics
orderby (double) g.Attributes["Distance"] ascending
select g;
myList.ItemsSource = sortedGraphics;
}
<ListBox x:Name="myList" VerticalAlignment="Top" HorizontalAlignment="Center" >
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Attributes[Distance]}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Maybe the C# to VB conversion was wrong?
... View more
02-09-2011
08:27 AM
|
0
|
0
|
1708
|
|
POST
|
You can do something like: App.xaml:
xmlns:media="clr-namespace:System.Windows.Media;assembly=System.Windows">
<Application.Resources>
<media:SolidColorBrush x:Key="mySolidColorBrush" Color="Green"/>
</Application.Resources>
To change this value in your ColorPickerControl.xaml.cs
SolidColorBrush brush = App.Current.Resources["mySolidColorBrush"] as SolidColorBrush;
brush.Color = Colors.Yellow;
This will allow you to do:
<esri:SimpleMarkerSymbol x:Key="RedMarkerSymbol" Color="{Binding Source={StaticResource mySolidColorBrush}}" Size="12" Style="Circle" />
... View more
02-09-2011
07:48 AM
|
0
|
0
|
1225
|
|
POST
|
You can look at Linq samples here: http://msdn.microsoft.com/en-us/vbasic/bb737912#obydescsimp1 'g' in the Linq query is a temporary variable that represents element in your collection. It serves the same purpose as in foreach(var g in args.FeatureSet.Features). If you convert the attribute value to string, the sort for (1,2,11) will be (1,11,2) because they will be treated as strings.
... View more
02-09-2011
07:26 AM
|
0
|
0
|
1708
|
|
POST
|
I think this type of Binding statement relies on DataContext being set. You might need to set Binding Source instead. I do not see where you define silverlightRedliningTools or markerSymbolColor. I think it would be something like Color="{Binding Source={StaticResource markerSymbolColor}, Path=Color}" where markerSymbolColor is a key of another resource.
... View more
02-08-2011
09:20 PM
|
0
|
0
|
1225
|
|
POST
|
Are you using this SDK sample?http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#InfoWindowSimple I tried to modify the DataTemplate to include multiple TextBlocks and all of them were displayed without adjusting the InfoWindow Height. Maybe you can check if the Binding is correct, you can use FallBackValue property. Text="{Binding [DegMinSec], FallbackValue=Binding failed}"
... View more
02-08-2011
08:21 PM
|
0
|
0
|
4777
|
|
POST
|
Then there must be something wrong with the map service. You can go through this help doc to check if you have everything set up correctly: http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//00930000004r000000.htm
... View more
02-08-2011
07:54 PM
|
0
|
0
|
1571
|
|
POST
|
Once the layer is added to the map, it gets initialized, you don't need to explicitly call Initialize(). You can subscribe to its Initialized event, if you need to do something right after the layer is initialized. In your code snippet though, you don't need to call Update() since it is the first time you are querying the service. If you will be updating Where clause again, check whether layer.IsInitialized before you call Update().
... View more
02-08-2011
07:48 PM
|
0
|
0
|
1508
|
|
POST
|
GetDistance() in this post is not yet implemented.
private double GetDistance(MapPoint a, MapPoint b)
{
if (a == null || b == null) return 0;
return Math.Sqrt(Math.Pow(a.X - b.X, 2) + Math.Pow(a.Y - b.Y, 2));
}
... View more
02-08-2011
07:36 PM
|
0
|
0
|
1213
|
|
POST
|
I'm not sure how correct the syntax is, I used http://www.developerfusion.com/tools/convert/csharp-to-vb/ Since you still need to calculate the distance of each graphic from the buffer point, you should do the following code after you have added this attribute for each graphic.
Dim sortedGraphics = From g In args.FeatureSet.Features Order By CDbl(g.Attributes("Distance")) Ascending
imageListBuffer.ItemsSource = sortedGraphics
... View more
02-08-2011
07:25 PM
|
0
|
0
|
1708
|
|
POST
|
For me, I think Linq query might be the easiest solution. Once you have calculated and added the Distance, you can order by this attribute. You can then set ListBox ItemSource with the sortedGraphics.
var sortedGraphics = from g in graphicsLayer.Graphics
orderby (double)g.Attributes["Distance"] ascending
select g;
... View more
02-08-2011
11:06 AM
|
0
|
0
|
2595
|
|
POST
|
Sure no problem. If you will be using InfoWindow, MyInfoWindow.IsOpen = false; is the code that closes the InfoWindow. You can set this anytime.
... View more
02-08-2011
10:48 AM
|
0
|
0
|
1833
|
|
POST
|
You can add a button and on click event change the Visibility of IdentifyResultsPanel to Collapsed.
... View more
02-08-2011
10:44 AM
|
0
|
0
|
1041
|
|
POST
|
The error is calling Update() before the layer is initialized. Since you are just adding the layer to your Map.Layers, the layer is not initialized yet. Also, you don't need to call Update() if the Where clause is not changing. In your code, you are setting Where clause for the first time and don't need to call Update(). If you will be changing Where clause later on and need to re-query the service, then you can call Update().
... View more
02-08-2011
10:40 AM
|
0
|
0
|
1508
|
| 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
|