<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi All,
<div><br>
</div>
<div>I am working on an application where I have used Dotspatail dll for display of map.</div>
<div>How do we get selected layer information.</div>
<div>I have tried implementing the same with following code but all is not well</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div> DotSpatial.Controls.IMapLayer laySelected = null;</div>
<div> DotSpatial.Symbology.FeatureLayer fea = null;</div>
<div> //string layerSelected = "";</div>
<div> </div>
<div> foreach (DotSpatial.Controls.IMapLayer lay in uxMap.GetFeatureLayers())</div>
<div> {</div>
<div> fea = (FeatureLayer)lay;</div>
<div> ISelection sel = fea.Selection;</div>
<div> // F = sel.ToFeatureSet();</div>
<div> List<IFeature> ls1 = new List<IFeature>();</div>
<div> </div>
<div> ls1 = sel.ToFeatureList();</div>
<div> if (ls1.Count > 0)</div>
<div> {</div>
<div> laySelected = lay;</div>
<div> break;</div>
<div> }</div>
<div> }</div>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">Thanks and Regards<br>
Nikhil Sai Parupalli<br>
<br>
<br>
<br>
<span style="font-weight:bold">Note</span>: <span style="color:rgb(255,0,0)">Do not print this email until and unless it is really required. Save paper</span> ,
<span style="color:rgb(51,153,102); font-weight:bold">stay <span style="color:rgb(51,153,102)">
Gre</span>en</span><br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>