# Switch between layers

**URL:** <https://community.thinkgeo.com/t/switch-between-layers/1855>\
**Category:** WinForms\
**Created:** [December 5, 2011, 4:41pm UTC](https://community.thinkgeo.com/t/switch-between-layers/1855 "2011-12-05T16:41:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inna](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/i/8e8cbc/32.png) [@Inna](https://community.thinkgeo.com/u/Inna)\
**Post date:** [December 5, 2011, 4:41pm UTC](https://community.thinkgeo.com/t/switch-between-layers/1855/1 "2011-12-05T16:41:31Z")

</div>

Hi&nbsp;all,

Is&nbsp;it&nbsp;possible&nbsp;to&nbsp;switch&nbsp;between&nbsp;&nbsp;WorldMapKit&nbsp;and&nbsp;ShapeFileFeatureLayer&nbsp;depending&nbsp;on&nbsp;zoom&nbsp;level?  
  
For&nbsp;example,&nbsp;I&nbsp;want&nbsp;to&nbsp;use&nbsp;ShapeFileFeatureLayer&nbsp;from&nbsp;zoom&nbsp;level&nbsp;01&nbsp;till&nbsp;zoom&nbsp;level&nbsp;07&nbsp;and&nbsp;from&nbsp;zoom&nbsp;level&nbsp;08&nbsp;switch&nbsp;to&nbsp;WorldMapKit&nbsp;or&nbsp;OpenStreetMap.

Thanks&nbsp;in&nbsp;advance,&nbsp;  
  
Vicky

---

<div class="post-metadata">

**Author:** ![David](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@David](https://community.thinkgeo.com/u/David)\
**Post date:** [December 5, 2011, 8:11pm UTC](https://community.thinkgeo.com/t/switch-between-layers/1855/2 "2011-12-05T20:11:36Z")

</div>

Vicky,

It&nbsp;is&nbsp;possible&nbsp;to&nbsp;have&nbsp;them&nbsp;switch&nbsp;by&nbsp;adjusting&nbsp;styes&nbsp;on&nbsp;the&nbsp;zoom&nbsp;levels&nbsp;of&nbsp;the&nbsp;shapefile&nbsp;and&nbsp;by&nbsp;adjusting&nbsp;the&nbsp;upper&nbsp;and&nbsp;lower&nbsp;threshold&nbsp;on&nbsp;the&nbsp;WorldMapKitLayer.&nbsp;&nbsp;Just&nbsp;to&nbsp;be&nbsp;sure&nbsp;are&nbsp;you&nbsp;going&nbsp;to&nbsp;use&nbsp;the&nbsp;WorldMapKitLayer&nbsp;or&nbsp;the&nbsp;Overlay&nbsp;in&nbsp;the&nbsp;desktop&nbsp;edition?&nbsp;&nbsp;Here&nbsp;is&nbsp;the&nbsp;rough&nbsp;code.

`ShapeFileFeatureLayer shapeFileFeatureLayer = new ShapeFileFeatureLayer();            WorldMapKitLayer worldMapKitLayer = new WorldMapKitLayer();            worldMapKitLayer.UpperThreshold = shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel08.Scale;            worldMapKitLayer.LowerThreshold = shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel20.Scale;            shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.CenterPen.Color = GeoColor.StandardColors.Red;            shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level07;`&nbsp;

David

---

<div class="post-metadata">

**Author:** ![Inna](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/i/8e8cbc/32.png) [@Inna](https://community.thinkgeo.com/u/Inna)\
**Post date:** [December 6, 2011, 11:41am UTC](https://community.thinkgeo.com/t/switch-between-layers/1855/3 "2011-12-06T11:41:25Z")

</div>

Hi&nbsp;David.

Thanks&nbsp;for&nbsp;the&nbsp;answer.&nbsp;&nbsp;It&nbsp;did&nbsp;the&nbsp;trick.

Vicky

---

<div class="post-metadata">

**Author:** ![Clint](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@Clint](https://community.thinkgeo.com/u/Clint)\
**Post date:** [December 6, 2011, 3:47pm UTC](https://community.thinkgeo.com/t/switch-between-layers/1855/4 "2011-12-06T15:47:32Z")

</div>

Vicky,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I’m&nbsp;glad&nbsp;David’s&nbsp;answer&nbsp;did&nbsp;the&nbsp;trick,&nbsp;let&nbsp;us&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;other&nbsp;questions.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks!
