# Detect Drawn Styles

**URL:** <https://community.thinkgeo.com/t/detect-drawn-styles/2240>\
**Category:** WinForms\
**Created:** [May 21, 2013, 7:19am UTC](https://community.thinkgeo.com/t/detect-drawn-styles/2240 "2013-05-21T07:19:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedro](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/p/919ad9/32.png) [@Pedro](https://community.thinkgeo.com/u/Pedro)\
**Post date:** [May 21, 2013, 7:19am UTC](https://community.thinkgeo.com/t/detect-drawn-styles/2240/1 "2013-05-21T07:19:35Z")

</div>

As&nbsp;there's&nbsp;no&nbsp;built-in&nbsp;Interative&nbsp;Layer&nbsp;Control&nbsp;on&nbsp;MapSuite&nbsp;Desktop&nbsp;Edition,&nbsp;I&nbsp;am&nbsp;building&nbsp;one&nbsp;by&nbsp;myelf.  
  
  
  
So&nbsp;far,&nbsp;everything&nbsp;is&nbsp;going&nbsp;OK,&nbsp;but&nbsp;now&nbsp;I&nbsp;want&nbsp;another&nbsp;feature&nbsp;that&nbsp;will&nbsp;support&nbsp;me&nbsp;to&nbsp;have&nbsp;a&nbsp;sort&nbsp;of&nbsp;"smart&nbsp;layer&nbsp;control".

The&nbsp;idea&nbsp;is&nbsp;that&nbsp;I&nbsp;want&nbsp;to&nbsp;get&nbsp;the&nbsp;styles&nbsp;that&nbsp;are&nbsp;visible&nbsp;within&nbsp;the&nbsp;current&nbsp;extent.

For&nbsp;example:

Let`s&nbsp;say&nbsp;I&nbsp;have&nbsp;one&nbsp;value&nbsp;based&nbsp;style&nbsp;that&nbsp;colors&nbsp;my&nbsp;shapes&nbsp;in&nbsp;5&nbsp;different&nbsp;colors,&nbsp;depending&nbsp;on&nbsp;a&nbsp;shape&nbsp;field:&nbsp;Green,Zellow,Pink,Black&nbsp;and&nbsp;Blue.

&nbsp;If&nbsp;I&nbsp;am&nbsp;seeing&nbsp;the&nbsp;full&nbsp;map&nbsp;extent,&nbsp;I&nbsp;want&nbsp;to&nbsp;show&nbsp;on&nbsp;my&nbsp;layer&nbsp;control&nbsp;all&nbsp;the&nbsp;5&nbsp;styles,&nbsp;based&nbsp;on&nbsp;the&nbsp;code&nbsp;you&nbsp;provided.&nbsp;But&nbsp;let`s&nbsp;say&nbsp;that&nbsp;I&nbsp;zoom&nbsp;in&nbsp;to&nbsp;an&nbsp;extent&nbsp;that&nbsp;will&nbsp;show&nbsp;me&nbsp;only&nbsp;2&nbsp;styles:&nbsp;Green&nbsp;and&nbsp;Blue.&nbsp;

What&nbsp;i&nbsp;want&nbsp;tis&nbsp;that&nbsp;the&nbsp;Map&nbsp;control&nbsp;gives&nbsp;me&nbsp;only&nbsp;the&nbsp;applied&nbsp;styles&nbsp;to&nbsp;the&nbsp;current&nbsp;extent,&nbsp;allowing&nbsp;me&nbsp;to&nbsp;show&nbsp;only&nbsp;Green&nbsp;and&nbsp;blue&nbsp;at&nbsp;that&nbsp;time.

How&nbsp;could&nbsp;I&nbsp;achieve&nbsp;that?  
  
  
  
I&nbsp;tried&nbsp;to&nbsp;get&nbsp;some&nbsp;Infos&nbsp;from&nbsp;the&nbsp;OverlaysDrawn&nbsp;event,&nbsp;but&nbsp;I&nbsp;could&nbsp;not&nbsp;get&nbsp;only&nbsp;the&nbsp;drawn&nbsp;styles...&nbsp;I&nbsp;would&nbsp;not&nbsp;like&nbsp;to&nbsp;use&nbsp;QueryTools&nbsp;as&nbsp;this&nbsp;might&nbsp;create&nbsp;some&nbsp;Performance&nbsp;issues&nbsp;when&nbsp;map&nbsp;extent&nbsp;is&nbsp;too&nbsp;big(World&nbsp;extent,&nbsp;for&nbsp;example)..&nbsp;&nbsp;And&nbsp;on&nbsp;the&nbsp;other&nbsp;Hand,&nbsp;even&nbsp;if&nbsp;I&nbsp;get&nbsp;the&nbsp;drawn&nbsp;Features&nbsp;from&nbsp;the&nbsp;Feature&nbsp;source&nbsp;I&nbsp;will&nbsp;have&nbsp;one&nbsp;extra&nbsp;work&nbsp;to&nbsp;find&nbsp;out&nbsp;the&nbsp;applied&nbsp;styles&nbsp;to&nbsp;each&nbsp;Feature....  
  
  
  
Anyone?

Regards,

PCBL

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [May 23, 2013, 3:27am UTC](https://community.thinkgeo.com/t/detect-drawn-styles/2240/2 "2013-05-23T03:27:28Z")

</div>

Hi&nbsp;Pedro,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post,&nbsp;we&nbsp;have&nbsp;answered&nbsp;it&nbsp;in&nbsp;your&nbsp;ticket10036,&nbsp;would&nbsp;you&nbsp;please&nbsp;check&nbsp;it&nbsp;there?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Best&nbsp;Regards&nbsp;  
&nbsp;&nbsp;  
&nbsp;Johnny&nbsp;
