# Problems with Labels

**URL:** <https://community.thinkgeo.com/t/problems-with-labels/1624>\
**Category:** WinForms\
**Created:** [March 8, 2011, 11:53am UTC](https://community.thinkgeo.com/t/problems-with-labels/1624 "2011-03-08T11:53:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonathan](https://community.thinkgeo.com/u/Jonathan)\
**Post date:** [March 8, 2011, 11:53am UTC](https://community.thinkgeo.com/t/problems-with-labels/1624/1 "2011-03-08T11:53:43Z")

</div>

Hi,

I'm&nbsp;trying&nbsp;to&nbsp;display&nbsp;feature&nbsp;labels&nbsp;with&nbsp;Map&nbsp;Suite&nbsp;Desktop.

My&nbsp;map&nbsp;consist&nbsp;in&nbsp;a&nbsp;list&nbsp;of&nbsp;shape&nbsp;files.&nbsp;I&nbsp;have&nbsp;added&nbsp;fixed&nbsp;label&nbsp;by&nbsp;a&nbsp;featurelayer.

I've&nbsp;already&nbsp;used&nbsp;the&nbsp;solution&nbsp;below&nbsp;succesfully&nbsp;in&nbsp;one&nbsp;project&nbsp;of&nbsp;mine.

&nbsp;

Protected&nbsp;Function&nbsp;AddTestoMap(ByVal&nbsp;AddNewLayer&nbsp;As&nbsp;StructLayer)&nbsp;As&nbsp;Boolean

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;bReturn&nbsp;As&nbsp;Boolean&nbsp;=&nbsp;False

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;OverlayAdd&nbsp;As&nbsp;LayerOverlay&nbsp;=&nbsp;ControlNameGroup(AddNewLayer.strNomeLayerOverlay)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;bitmapLayer&nbsp;As&nbsp;New&nbsp;InMemoryFeatureLayer()

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.Name&nbsp;=&nbsp;AddNewLayer.strNomeLayer

&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel01.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel01.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel02.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel02.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel03.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel03.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel04.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel04.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel05.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel05.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel06.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel06.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel07.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel07.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel08.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel08.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel09.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel09.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel10.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel10.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel11.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel11.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel12.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel12.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel13.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel13.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel14.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel14.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel15.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel15.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel16.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel16.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel17.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel17.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel18.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel18.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel19.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel19.Scale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel20.Scale&nbsp;=&nbsp;Me.\_MapThinkGeo.ZoomLevelSet.ZoomLevel20.Scale

&nbsp;

&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.Open()

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.Columns.Add(New&nbsp;FeatureSourceColumn(AddNewLayer.strNomeLayer))

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.Close()

&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ptPosition&nbsp;As&nbsp;New&nbsp;PointShape(AddNewLayer.dblX,&nbsp;AddNewLayer.dblY)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;testFeature&nbsp;As&nbsp;Feature&nbsp;=&nbsp;New&nbsp;Feature(ptPosition)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;testFeature.ColumnValues.Add(AddNewLayer.strNomeLayer,&nbsp;AddNewLayer.strTestoWrite)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.InternalFeatures.Add(testFeature)

&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Select&nbsp;Case&nbsp;AddNewLayer.enCodiceStile

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[...]

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case&nbsp;MapStyle.TestoOrdineNP

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel15.DefaultTextStyle&nbsp;=&nbsp;TextStyles.CreateMaskTextStyle(AddNewLayer.strNomeLayer,&nbsp;"Arial",&nbsp;9,&nbsp;DrawingFontStyles.Bold,&nbsp;GeoColor.StandardColors.Black,&nbsp;New&nbsp;GeoColor(255,&nbsp;255,&nbsp;255))

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel15.DefaultTextStyle.BestPlacement&nbsp;=&nbsp;False

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel15.DefaultTextStyle.OverlappingRule&nbsp;=&nbsp;LabelOverlappingRule.AllowOverlapping

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel15.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel15.DefaultPointStyle&nbsp;=&nbsp;PointStyles.CreateSimpleCircleStyle(GeoColor.StandardColors.White,&nbsp;6,&nbsp;GeoColor.SimpleColors.Black,&nbsp;1)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel15.DefaultTextStyle.PointPlacement&nbsp;=&nbsp;PointPlacement.CenterRight

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel15.DefaultTextStyle.XOffsetInPixel&nbsp;=&nbsp;5

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel15.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case&nbsp;Else

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle&nbsp;=&nbsp;TextStyles.State1(AddNewLayer.strNomeLayer)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bitmapLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Select

&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'--&nbsp;Aggiungo&nbsp;il&nbsp;layer&nbsp;al&nbsp;gruppo

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OverlayAdd.Lock.EnterWriteLock()

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OverlayAdd.Layers.Add(bitmapLayer.Name,&nbsp;bitmapLayer)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;AddNewLayer.bAddTopList&nbsp;Then

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OverlayAdd.Layers.MoveToTop(OverlayAdd.Layers.Count&nbsp;-&nbsp;1)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If

&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bReturn&nbsp;=&nbsp;True

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Catch&nbsp;ex&nbsp;As&nbsp;Exception

&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finally

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OverlayAdd.Lock.ExitWriteLock()

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Try

&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;bReturn

&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function

Me.\_MapThinkGeo&nbsp;is&nbsp;the&nbsp;map&nbsp;component.

StructLayer&nbsp;is&nbsp;a&nbsp;temporary&nbsp;structure&nbsp;for&nbsp;store&nbsp;data.

&nbsp;

Now&nbsp;I&nbsp;have&nbsp;to&nbsp;use&nbsp;the&nbsp;same&nbsp;solution&nbsp;in&nbsp;another&nbsp;project.

The&nbsp;only&nbsp;thing&nbsp;that&nbsp;has&nbsp;changed&nbsp;is&nbsp;the&nbsp;scale&nbsp;of&nbsp;shapes&nbsp;files.

Everything&nbsp;works&nbsp;well&nbsp;but&nbsp;I&nbsp;can't&nbsp;see&nbsp;text&nbsp;labels&nbsp;on&nbsp;my&nbsp;map.&nbsp;On&nbsp;the&nbsp;other&nbsp;project,&nbsp;the&nbsp;same&nbsp;code&nbsp;works&nbsp;well&nbsp;and&nbsp;I&nbsp;see&nbsp;everything&nbsp;correctly.

&nbsp;

John

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 8, 2011, 11:47pm UTC](https://community.thinkgeo.com/t/problems-with-labels/1624/2 "2011-03-08T23:47:59Z")

</div>

John,

Thanks&nbsp;for&nbsp;your&nbsp;post,

According&nbsp;to&nbsp;your&nbsp;description&nbsp;I&nbsp;think&nbsp;your&nbsp;problem&nbsp;is&nbsp;from&nbsp;the&nbsp;scale&nbsp;of&nbsp;zoomlevel,&nbsp;as&nbsp;you&nbsp;mentioned&nbsp;the&nbsp;only&nbsp;thing&nbsp;that&nbsp;has&nbsp;changed&nbsp;is&nbsp;the&nbsp;scale&nbsp;of&nbsp;shapes&nbsp;file,&nbsp;so&nbsp;it&nbsp;caused&nbsp;the&nbsp;text&nbsp;labels&nbsp;cannot&nbsp;be&nbsp;displayed&nbsp;correctly.&nbsp;Obviously,&nbsp;you&nbsp;set&nbsp;the&nbsp;incorrect&nbsp;scale&nbsp;for&nbsp;zoomlevels.&nbsp;For&nbsp;the&nbsp;scale&nbsp;of&nbsp;zoomlevels&nbsp;you&nbsp;have&nbsp;to&nbsp;set&nbsp;them&nbsp;as&nbsp;a&nbsp;rule:&nbsp;Each&nbsp;zoom&nbsp;level&nbsp;is&nbsp;half&nbsp;in&nbsp;scale&nbsp;of&nbsp;the&nbsp;previous&nbsp;one.&nbsp;Please&nbsp;check&nbsp;the&nbsp;attachment&nbsp;for&nbsp;understanding&nbsp;it&nbsp;fully,&nbsp;also&nbsp;you&nbsp;can&nbsp;refer&nbsp;the&nbsp;sample&nbsp;code&nbsp;to&nbsp;your&nbsp;own&nbsp;application&nbsp;for&nbsp;setting&nbsp;the&nbsp;scale&nbsp;of&nbsp;zoomlevels.&nbsp;Also&nbsp;because&nbsp;the&nbsp;limitation&nbsp;issue&nbsp;I&nbsp;didn't&nbsp;attach&nbsp;the&nbsp;austinstreets.shp&nbsp;file,&nbsp;please&nbsp;reference&nbsp;it&nbsp;before&nbsp;you&nbsp;run&nbsp;the&nbsp;sample.

Thanks,

Scott,

[CustomZoomLevels.zip](https://community.thinkgeo.com/uploads/default/original/2X/b/b1b8a78e7bcc3e5c4a0e36f9d00ec4cd713292fd.zip) (29.7 KB)

---

<div class="post-metadata">

**Author:** ![Jonathan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonathan](https://community.thinkgeo.com/u/Jonathan)\
**Post date:** [March 14, 2011, 12:07pm UTC](https://community.thinkgeo.com/t/problems-with-labels/1624/3 "2011-03-14T12:07:33Z")

</div>

&nbsp;Ok,

I've&nbsp;changed&nbsp;my&nbsp;code:&nbsp;now&nbsp;I&nbsp;set&nbsp;every&nbsp;zoom&nbsp;level&nbsp;according&nbsp;with&nbsp;your&nbsp;rules.

[...]

MapThinkGeo.MapUnit&nbsp;=&nbsp;GeographyUnit.Feet

MapThinkGeo.BackgroundOverlay.BackgroundBrush&nbsp;=&nbsp;New&nbsp;GeoSolidBrush(GeoColor.GeographicColors.DeepOcean)

GetCustomZoomLevelSet(MapThinkGeo.ZoomLevelSet,&nbsp;50)

[...]

&nbsp;Public&nbsp;Function&nbsp;GetCustomZoomLevelSet(ByRef&nbsp;zSet&nbsp;As&nbsp;ZoomLevelSet,&nbsp;ByVal&nbsp;initialScale&nbsp;As&nbsp;Double)&nbsp;As&nbsp;Boolean

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel01.Scale&nbsp;=&nbsp;initialScale

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel02.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;2

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel03.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;4

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel04.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;8

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel05.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;16

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel06.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;32

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel07.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;64

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel08.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;128

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel09.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;256

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel10.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;512

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel11.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;1024

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel12.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;2048

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel13.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;4096

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel14.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;8192

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel15.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;16384

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel16.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;32768

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel17.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;65536

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel18.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;131072

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel19.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;262144

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zSet.ZoomLevel20.Scale&nbsp;=&nbsp;initialScale&nbsp;/&nbsp;524288

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;True

&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function

Now&nbsp;labels&nbsp;appears&nbsp;but&nbsp;I&nbsp;still&nbsp;have&nbsp;problems.

I'm&nbsp;trying&nbsp;to&nbsp;hide&nbsp;and&nbsp;to&nbsp;apply&nbsp;different&nbsp;styles&nbsp;to&nbsp;my&nbsp;layers&nbsp;based&nbsp;on&nbsp;zoom&nbsp;levels.

When&nbsp;I&nbsp;create&nbsp;ShapeFileFeatureLayer&nbsp;or&nbsp;InMemoryFeatureLayer&nbsp;I&nbsp;set&nbsp;style&nbsp;in&nbsp;this&nbsp;manner:

[...]

Select&nbsp;Case&nbsp;enCodiceStile

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case&nbsp;MapStyle.Lago

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AddLayer.ZoomLevelSet.ZoomLevel11.DefaultAreaStyle&nbsp;=&nbsp;AreaStyles.Water1

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AddLayer.ZoomLevelSet.ZoomLevel11.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20

[...]

I&nbsp;expect&nbsp;that&nbsp;this&nbsp;featurelayer/shapelayer&nbsp;is&nbsp;hidden&nbsp;until&nbsp;zoom&nbsp;level&nbsp;10&nbsp;and&nbsp;visible&nbsp;from&nbsp;level&nbsp;11&nbsp;to&nbsp;20&nbsp;with&nbsp;Water1&nbsp;style.&nbsp;Instead&nbsp;zoomlevel&nbsp;is&nbsp;always&nbsp;visible.

&nbsp;

Thanks

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 14, 2011, 11:56pm UTC](https://community.thinkgeo.com/t/problems-with-labels/1624/4 "2011-03-14T23:56:17Z")

</div>

Jonathan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Can&nbsp;you&nbsp;provide&nbsp;us&nbsp;a&nbsp;simple&nbsp;sample&nbsp;so&nbsp;that&nbsp;we&nbsp;can&nbsp;reproduce&nbsp;this&nbsp;problem&nbsp;correctly?&nbsp;Currently&nbsp;according&nbsp;to&nbsp;our&nbsp;tests,&nbsp;if&nbsp;I&nbsp;set&nbsp;the&nbsp;area&nbsp;style&nbsp;from&nbsp;zoomlevel11&nbsp;to&nbsp;zoomlevel20,&nbsp;the&nbsp;shape&nbsp;file&nbsp;is&nbsp;hidden&nbsp;until&nbsp;zoom&nbsp;level&nbsp;10&nbsp;and&nbsp;visible&nbsp;from&nbsp;zoomlevel11&nbsp;to&nbsp;20.&nbsp;So&nbsp;I&nbsp;have&nbsp;a&nbsp;question&nbsp;to&nbsp;ask&nbsp;you,&nbsp;did&nbsp;you&nbsp;set&nbsp;the&nbsp;minimum&nbsp;scale&nbsp;and&nbsp;maximum&nbsp;scale&nbsp;values?&nbsp;If&nbsp;you&nbsp;set,&nbsp;what&nbsp;are&nbsp;the&nbsp;values?&nbsp;If&nbsp;it&nbsp;is&nbsp;possible&nbsp;please&nbsp;give&nbsp;us&nbsp;a&nbsp;simple&nbsp;sample&nbsp;to&nbsp;reproduce&nbsp;it&nbsp;and&nbsp;resolve&nbsp;your&nbsp;problem&nbsp;correctly.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Scott,

---

<div class="post-metadata">

**Author:** ![Jonathan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonathan](https://community.thinkgeo.com/u/Jonathan)\
**Post date:** [March 15, 2011, 3:19am UTC](https://community.thinkgeo.com/t/problems-with-labels/1624/5 "2011-03-15T03:19:48Z")

</div>

I’ve&nbsp;to&nbsp;build&nbsp;the&nbsp;sample&nbsp;you&nbsp;required.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Meanwhile&nbsp;can&nbsp;you&nbsp;tell&nbsp;me&nbsp;why&nbsp;we&nbsp;have&nbsp;ZoomLevelSet&nbsp;property&nbsp;inThinkGeo.MapSuite.DesktopEdition.WinformsMap&nbsp;and&nbsp;also&nbsp;in&nbsp;ThinkGeo.MapSuite.Core.FeatureLayer?&nbsp;  
&nbsp;I’ve&nbsp;set&nbsp;Scale&nbsp;property&nbsp;on&nbsp;WinformsMap.ZoomLevelSet.&nbsp;  
&nbsp;Do&nbsp;I&nbsp;have&nbsp;to&nbsp;set&nbsp;Scale&nbsp;on&nbsp;every&nbsp;FeatureLayer.ZoomLevelSet?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks

---

<div class="post-metadata">

**Author:** ![Jonathan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonathan](https://community.thinkgeo.com/u/Jonathan)\
**Post date:** [March 15, 2011, 3:26am UTC](https://community.thinkgeo.com/t/problems-with-labels/1624/6 "2011-03-15T03:26:26Z")

</div>

I&nbsp;forgot&nbsp;to&nbsp;answer&nbsp;your&nbsp;question.&nbsp;  
&nbsp;I’ve&nbsp;set&nbsp;minimum&nbsp;and&nbsp;maximum&nbsp;scale&nbsp;in&nbsp;this&nbsp;manner:&nbsp;  
&nbsp;&nbsp;  
&nbsp;MapThinkGeo.MinimumScale&nbsp;=&nbsp;MapThinkGeo.ZoomLevelSet.ZoomLevel20.Scale&nbsp;  
&nbsp;MapThinkGeo.MaximumScale&nbsp;=&nbsp;MapThinkGeo.ZoomLevelSet.ZoomLevel01.Scale&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;John

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 15, 2011, 8:47am UTC](https://community.thinkgeo.com/t/problems-with-labels/1624/7 "2011-03-15T08:47:42Z")

</div>

Jonathan,

Thanks&nbsp;for&nbsp;your&nbsp;post&nbsp;and&nbsp;questions.  
&nbsp;  
I&nbsp;do&nbsp;not&nbsp;think&nbsp;you&nbsp;need&nbsp;to&nbsp;set&nbsp;scale&nbsp;for&nbsp;each&nbsp;feature&nbsp;layer&nbsp;as&nbsp;it&nbsp;will&nbsp;use&nbsp;the&nbsp;customized&nbsp;zoomlevel&nbsp;set&nbsp;when&nbsp;you&nbsp;set&nbsp;it&nbsp;to&nbsp;the&nbsp;map&nbsp;control&nbsp;that&nbsp;will&nbsp;also&nbsp;indicate&nbsp;why&nbsp;we&nbsp;need&nbsp;to&nbsp;set&nbsp;the&nbsp;property&nbsp;of&nbsp;ZoomLevelSet.  
&nbsp;  
Any&nbsp;more&nbsp;questions&nbsp;or&nbsp;concerns&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.  
&nbsp;  
Thanks.  
&nbsp;  
Yale
