HI , I have written the below code
<esriSymbols:SimpleLineSymbol x:Name="LineSymbolDeepPink" Color="DeepPink" Width="3" />
<esriSymbols:SimpleLineSymbol x:Name="LineSymbolRed" Color="Red" Width="3" />
for (int i = 0; i < featureSet.Features.Count(); i++)
{
selectedFeature = featureSet.Features;
if (selectedFeature.Attributes["ROAD_CATEGORY"].ToString() == "1")
{
selectedFeature.Symbol = LineSymbolDeepPink;
}
else if (selectedFeature.Attributes["ROAD_CATEGORY"].ToString() == "2")
{
selectedFeature.Symbol = LineSymbolGreen;
}
graphicsLayer.Graphics.Add(selectedFeature);
}
// Hightlight selected feature
graphicsLayer.Graphics.Add(selectedFeature);
The graphic shows on the map but Does not show on the LegendI tried
<esri:UniqueValueRenderer.Infos>
<esri:UniqueValueInfo Value="1" Symbol="{StaticResource LineSymbolDeepPink}" />
<esri:UniqueValueInfo Value="2" Symbol="{StaticResource LineSymbolRed}" />
</esri:UniqueValueRenderer.Infos>
and also
<!--<esri:UniqueValueInfo Symbol="{StaticResource LineSymbolDeepPink}">
<esri:UniqueValueInfo.Value>
<sys:Int32>1</sys:Int32>
</esri:UniqueValueInfo.Value>
</esri:UniqueValueInfo>
<esri:UniqueValueInfo Symbol="{StaticResource LineSymbolRed}">
<esri:UniqueValueInfo.Value>
<sys:Int32>2</sys:Int32>
</esri:UniqueValueInfo.Value>
</esri:UniqueValueInfo>
but either the legend wont show or the graphic wont showwhat am I missing here? I want to show only the queried ROAD_CATEGORY on the map and the legend