AnsweredAssumed Answered

How to highlight feature on one of the map layers

Question asked by aviabunin on Dec 31, 2014
Latest reply on Dec 14, 2015 by NManocha-esristaff

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#