|
POST
|
Based on the code-snippet you provided, you are trying to use a Renderer with Symbol. This will not work, you have to choose one or the other. If you want to take advantage of the Legend control, you need to use the Renderer version. But the UniqueValueInfo.Value must match the field attribute in order for the symbol to show. Notice when you were updating the symbol, the comparison was: selectedFeature.Attributes["ROAD_CATEGORY"].ToString() == "1") You had to convert them to the same data type. The same thing holds true for UniqueValueRenderer, data type is also checked against. If neither string "1" nor int 1 worked, then maybe first check what the field data type is, maybe it's a double. You can check when the layer gets Initialized using the following code:
FeatureLayer l = sender as FeatureLayer;
Field.FieldType type = Field.FieldType.Unknown;
foreach (var f in l.LayerInfo.Fields)
{
if (f.Name == "ROAD_CATEGORY")
{
type = f.Type;
break;
}
}
... View more
02-17-2011
08:32 AM
|
0
|
0
|
423
|
|
POST
|
Ahh okay. I'm sorry about misunderstanding. I guess the title of this thread no longer applies. Anyway, I was able to repro the issue with v2.1 Final. Map ExtentChanged got fired everytime the Draw is enabled. Thank you for reporting this bug. This will be fixed in future version of the API. I'm no longer able to repro the issue with our latest source code. Notice that when ExtentChanged is raised by enabling/disabling draw, the following is true: e.NewExtent.Equals(e.OldExtent). For a workaround then, you can ignore cases when there is no real extent change.
... View more
02-17-2011
08:08 AM
|
0
|
0
|
1378
|
|
POST
|
What error are you getting? Are you serializing just the geometry? I'm guessing the trouble is serializing the entire Graphic, which includes Symbol. This related thread might help: http://forums.arcgis.com/threads/8774-save-layer-to-xml-file
... View more
02-17-2011
07:52 AM
|
0
|
0
|
674
|
|
POST
|
What do you mean by "in specific order"? Do you mean sorted results or sorted field names?
... View more
02-17-2011
07:48 AM
|
0
|
0
|
898
|
|
POST
|
Here's a sample of customizing BorderBrush. It is similar to customizing the Fill.
<esri:SimpleFillSymbol x:Name="DrawFillSymbol" Fill="Black" BorderThickness="10">
<esri:SimpleFillSymbol.BorderBrush>
<LinearGradientBrush x:Name="MyBrush" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="Yellow" Offset="0.0" />
<GradientStop Color="Red" Offset="0.25" />
<GradientStop Color="Blue" Offset="0.75" />
<GradientStop Color="LimeGreen" Offset="1.0" />
</LinearGradientBrush>
</esri:SimpleFillSymbol.BorderBrush>
</esri:SimpleFillSymbol>
... View more
02-17-2011
07:45 AM
|
0
|
0
|
485
|
|
POST
|
Yup, you are right. I meant to make a correction on my previous post. Edit on the feature attribute is detected when the row looses focus. I spoke with my colleague who worked on it and the reason for this design is subscribing to a TextChanged will be an expensive ("chatty") check.
... View more
02-16-2011
03:19 PM
|
0
|
0
|
1594
|
|
POST
|
This is related thread: http://forums.arcgis.com/threads/8575-Pan-Doesn-t-Work!!!
... View more
02-16-2011
03:15 PM
|
0
|
0
|
528
|
|
POST
|
I am using the code you provided against assemblies from v2.1 Final. Choosing draw mode should enable/disable draw but no exception is thrown for me. Could you be more specific with steps to reproduce? Something like: 1. Choose Point from ToolBar. 2. Draw the point on map. 3. Choose Clear graphics from ToolBar. Exception should be thrown.
... View more
02-16-2011
03:13 PM
|
0
|
0
|
1378
|
|
POST
|
Thank you for reporting this. We will include a fix in the future release of our API. For the meantime, before calling ToJson(), ensure that there are no null geometries.
... View more
02-16-2011
02:15 PM
|
0
|
0
|
582
|
|
POST
|
FeatureDataForm and FeatureLayer performs validation based on the requirements of the feature service. Validation against type, domain and length. If you need custom validation, you will need to write your own FeatureDataForm to ensure that certain fields are required and does not accept null values. The source code for Toolkit is available in CodePlex http://esrisilverlight.codeplex.com/. If you need to take a look at what FeatureDataForm is currently doing.
... View more
02-16-2011
10:36 AM
|
0
|
0
|
1549
|
|
POST
|
The expected behavior is that Commit button will be enabled once an edit to a field have been submitted (which you do when you leave the TextBox). You can refer to the following example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitFeatureDataGrid. Commit button does not re-enable on TextChanged, it is only after you the TextBox looses focus that the change is detected.
... View more
02-16-2011
10:22 AM
|
0
|
0
|
1594
|
|
POST
|
I think you need to customize the existing ProgressBar control. http://msdn.microsoft.com/en-us/library/dd334413(VS.95).aspx. You can also check out SL Toolkit here: http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html. As for map loading that shows progress bar or busy indicator, this is related thread: http://forums.arcgis.com/threads/23519-Issue-with-LayerCollection-LayersInitialized-event.
... View more
02-16-2011
10:14 AM
|
0
|
0
|
497
|
|
POST
|
And yes, I am able to replicate the problem in the sample by adding SnapToLevels and Min/Max resolution. Oh cool then you can just copy-paste relevant code so I can replicate the issue with this same sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#DrawGraphics.
... View more
02-16-2011
10:03 AM
|
0
|
0
|
1378
|
|
POST
|
Oh okay, I think you need to follow the syntax in this sample:http://msdn.microsoft.com/en-us/vbasic/bb737904#sumgroup Dim categories = From p In products _ Group p By p.Category Into Group _ Select Category, TotalUnitsInStock = Group.Sum(Function(p) p.UnitsInStock) and Select - Anonymous Type 2 in this sample: http://msdn.microsoft.com/en-us/vbasic/bb737936 Dim q = From e In db.Employees _ Select Name = e.FirstName & " " & e.LastName, Phone = e.HomePhone I code in C# so my conversions to VB could be wrong. I suggest you read up on LINQ for VB. It will be the best way to formulate your own query in the correct syntax too. I'm sorry that I cannot help further. I will let other VB developers who are also proficient in C# take a stab on converting this to VB. C# code:
var results = from g in graphicCollection
group g by (string)g.Attributes["Officer"] into r
select new { Officer = r.Key, Incidents = r.Sum(i => Convert.ToInt32(i.Attributes["Incident"])) };
... View more
02-16-2011
10:00 AM
|
0
|
0
|
1398
|
| 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
|