# Continous panning in WinformsMap

**URL:** <https://community.thinkgeo.com/t/continous-panning-in-winformsmap/2241>\
**Category:** WinForms\
**Created:** [May 21, 2013, 9:10am UTC](https://community.thinkgeo.com/t/continous-panning-in-winformsmap/2241 "2013-05-21T09:10:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joran](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/ba9def/32.png) [@Joran](https://community.thinkgeo.com/u/Joran)\
**Post date:** [May 21, 2013, 9:10am UTC](https://community.thinkgeo.com/t/continous-panning-in-winformsmap/2241/1 "2013-05-21T09:10:40Z")

</div>

&nbsp;Hi,

We&nbsp;have&nbsp;problems&nbsp;getting&nbsp;the&nbsp;WrapDateline&nbsp;mode&nbsp;to&nbsp;work&nbsp;(panning&nbsp;continously&nbsp;both&nbsp;east&nbsp;and&nbsp;west&nbsp;of&nbsp;the&nbsp;dateline)&nbsp;with&nbsp;ShapeFileFeatureLayer&nbsp;in&nbsp;WinformsMap.&nbsp;Can&nbsp;you&nbsp;please&nbsp;guide&nbsp;us&nbsp;in&nbsp;the&nbsp;right&nbsp;direction?

We&nbsp;are&nbsp;using&nbsp;DesktopEdition.WinformsMap&nbsp;version&nbsp;5.5

Short&nbsp;version&nbsp;of&nbsp;our&nbsp;code:

private&nbsp;readonly&nbsp;LayerOverlay&nbsp;\_staticOverlay&nbsp;=&nbsp;new&nbsp;LayerOverlay&nbsp;{&nbsp;IsBase&nbsp;=&nbsp;true&nbsp;};  
  
mapSuiteControl.BackgroundOverlay.BackgroundBrush&nbsp;=&nbsp;new&nbsp;GeoLinearGradientBrush(GeoColor.GeographicColors.ShallowOcean,&nbsp;GeoColor.GeographicColors.DeepOcean,&nbsp;GeoLinearGradientDirection.UpperLeftToLowerRight);  
  
  
  
//&nbsp;add&nbsp;world&nbsp;layer  
  
var&nbsp;layer&nbsp;&nbsp;=&nbsp;new&nbsp;ShapeFileFeatureLayer(Constants.MapBaseShapeFile,&nbsp;ShapeFileReadWriteMode.ReadOnly)  
  
 {&nbsp;FeatureSource&nbsp;=&nbsp;{Projection&nbsp;=&nbsp;MapProjection.Geodetic}&nbsp;};

var&nbsp;pen&nbsp;=&nbsp;new&nbsp;GeoPen(GeoColor.StandardColors.OliveDrab);  
  
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle&nbsp;=&nbsp;new&nbsp;HueFamilyAreaStyle(pen,&nbsp;GeoColor.StandardColors.PaleGreen,&nbsp;6);  
  
layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20;  
  
\_staticOverlay.Layers.Add(MapLayer.BackgroundMap.ToString(),&nbsp;layer);

layer.Open();  
  
ShapeFileFeatureLayer.BuildIndexFile(Constants.MapBaseShapeFile);&nbsp;//&nbsp;or&nbsp;layer.RequireIndex&nbsp;=&nbsp;false  
  
layer.WrappingMode&nbsp;=&nbsp;WrappingMode.WrapDateline;  
  
layer.WrappingExtent&nbsp;=&nbsp;layer.GetBoundingBox();&nbsp;//&nbsp;or&nbsp;layer.WrappingExtent&nbsp;=&nbsp;new&nbsp;RectangleShape(-180,90,180,-90)  
  
layer.Close();

Thanks&nbsp;

Jøran

---

<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 22, 2013, 7:59am UTC](https://community.thinkgeo.com/t/continous-panning-in-winformsmap/2241/2 "2013-05-22T07:59:18Z")

</div>

&nbsp;Hi&nbsp;Joran,&nbsp;

Would&nbsp;you&nbsp;please&nbsp;download&nbsp;the&nbsp;latest&nbsp;version&nbsp;”6.0.372.0”&nbsp;or&nbsp;“6.0.0.372”&nbsp;and&nbsp;try&nbsp;it&nbsp;again?&nbsp;Attached&nbsp;is&nbsp;our&nbsp;test&nbsp;code,&nbsp;please&nbsp;check&nbsp;it&nbsp;out.

Following&nbsp;are&nbsp;the&nbsp;result&nbsp;pictures&nbsp;of&nbsp;our&nbsp;test.&nbsp;

Using&nbsp;5.5

 ![](https://community.thinkgeo.com/uploads/default/original/2X/c/c9c998de9b1676bf3b249b6076d3edaf8d3fee6b.jpg)

Using&nbsp;6.0

 ![](https://community.thinkgeo.com/uploads/default/original/2X/2/2f541812d4a1137cbff0d4ad4446e0e50eefd6a2.jpg)

As&nbsp;you&nbsp;can&nbsp;see,&nbsp;in&nbsp;5.5&nbsp;there&nbsp;are&nbsp;some&nbsp;display&nbsp;problem,&nbsp;but&nbsp;in&nbsp;6.0&nbsp;it&nbsp;is&nbsp;displayed&nbsp;correctly.

&nbsp;

Hope&nbsp;it&nbsp;helps,&nbsp;

&nbsp;

Johnny

[Post11251Sample.txt](https://community.thinkgeo.com/uploads/default/original/2X/5/5c92a092812102ce746c35d2622da37b1a3059d8.txt) (1.43 KB)

---

<div class="post-metadata">

**Author:** ![Joran](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/ba9def/32.png) [@Joran](https://community.thinkgeo.com/u/Joran)\
**Post date:** [May 23, 2013, 3:14am UTC](https://community.thinkgeo.com/t/continous-panning-in-winformsmap/2241/3 "2013-05-23T03:14:28Z")

</div>

Thank&nbsp;you&nbsp;Jonnny!&nbsp;It&nbsp;seems&nbsp;to&nbsp;work&nbsp;well&nbsp;with&nbsp;version&nbsp;6.0.371.0.

Jøran

---

<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 24, 2013, 7:14am UTC](https://community.thinkgeo.com/t/continous-panning-in-winformsmap/2241/4 "2013-05-24T07:14:46Z")

</div>

Hi&nbsp;Joran&nbsp;  
&nbsp;&nbsp;  
&nbsp;Great&nbsp;to&nbsp;hear&nbsp;the&nbsp;problem&nbsp;is&nbsp;solved,&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question&nbsp;,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Best&nbsp;Regards&nbsp;  
&nbsp;&nbsp;  
&nbsp;Johnny&nbsp;
