Dear Gurus!
Now I use next xaml :
<esri:Map x:Name="myMap"> <esri:ArcGISDynamicMapServiceLayer ID="BaseLayer" Url="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer" /> <esri:FeatureLayer ID="routes_osm" Url="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer/1"> </esri:FeatureLayer> </esri:Map>
and next c#:
public void OnLightRoadEvent(string code) { feature_code = code; FeatureLayer featureLayer = myMap.Layers["routes_osm"] as FeatureLayer; foreach (Graphic p in featureLayer.Graphics) { if (p.Attributes["REF"].ToString() == feature_code) p.Selected = true; else p.Selected = false; } }
How to solve this problem only with the help of BaseLayer, without using additional routes_osm layer?
andand next next c#
anans
You can add Featurelayer in selection mode and then select or highlight features as shown in an example