# WrapDateLine Isuue

**URL:** <https://community.thinkgeo.com/t/wrapdateline-isuue/9009>\
**Category:** WebForms\
**Created:** [March 15, 2018, 12:16pm UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009 "2018-03-15T12:16:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [March 15, 2018, 12:16pm UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/1 "2018-03-15T12:16:25Z")

</div>

Hi,  
I want to wrap whole map. I used following code for making WrapDateLine.

Code:  
worldOverlay.WrapDateline = ThinkGeo.MapSuite.WebEdition.WrapDatelineMode.WrapDateline;

But it’s not working out.

Here I am attaching sample.  
[WebApplication\_AircraftBlink.zip](https://community.thinkgeo.com/uploads/default/original/3X/b/0/b03291ee6b4c0f6e39571c990fdc163205e6df3e.zip) (240.8 KB)

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [March 16, 2018, 3:41am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/2 "2018-03-16T03:41:59Z")

</div>

Hi Riyaz,

Please let us know your dll version.

It looks your application point to the dll in GAC but I don’t have dll there, so I don’t know what’s the detail version number.

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [March 16, 2018, 4:13am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/3 "2018-03-16T04:13:41Z")

</div>

Hi Ethan,  
bin folder missing. here i am attaching bin folder.  
[bin.zip](https://community.thinkgeo.com/uploads/default/original/3X/b/6/b6e703b187e3c63918ba3ad75c8299b697d318a4.zip) (2.5 MB)

I am using VS2010(.net framework 4) and thinkgeo 9.0.0.0.

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [March 16, 2018, 9:08am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/4 "2018-03-16T09:08:33Z")

</div>

Hi Riyaz,

You should also set the property for layer:

ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(@“D:\ThePosts\8997\users\WebApplication\_AircraftBlink\WebApplication\_AircraftBlink\App\_Data\Countries02.shp”);  
worldLayer.Open();  
worldLayer.WrappingExtent = worldLayer.GetBoundingBox();  
worldLayer.WrappingMode = WrappingMode.WrapDateline;  
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = new AreaStyle(new GeoPen(GeoColor.FromArgb(80, 181, 202, 185), 1F), new GeoSolidBrush(GeoColor.FromArgb(255, 255, 255, 255)));  
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

 ![](https://community.thinkgeo.com/uploads/default/original/3X/5/e/5ef1f3e46bb3fd9aac10ceda0ff55b8829b55149.png)

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [March 16, 2018, 10:26am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/5 "2018-03-16T10:26:59Z")

</div>

Hi Ethan,  
Thanks, it’s work out.

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [March 19, 2018, 1:53am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/6 "2018-03-19T01:53:00Z")

</div>

Hi Riyaz,

I am glad to hear that works.

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [March 21, 2018, 10:31am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/7 "2018-03-21T10:31:25Z")

</div>

Hi Ethan,  
I got some other issues in WrapDateLine.

1. WrapDateLine functionality not working in GraticuleAdornmentLayer.  
Code:  
LineStyle customDashLineStyle = LineStyles.CreateSimpleLineStyle(GeoColors.Gray, 1, LineDashStyle.Custom, true);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);

Here I am attaching sample for your reference.  
[WrapDateLine.zip](https://community.thinkgeo.com/uploads/default/original/3X/0/f/0f70ac95e5d41dfe60f3f3830e97e57ebd447bd3.zip) (2.9 KB)  
2. There is no such property called WrapDateLine in GdiPlusRasterLayer.  
But i want to set wrap date line to GdiPlusRasterLayer.

please suggest me to fix this issues.

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [March 22, 2018, 11:08am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/8 "2018-03-22T11:08:30Z")

</div>

Hi Riyaz,

It looks the WrapDateline don’t works well for the GraticuleAdornmentLayer, our developer will look into it to see where is the problem.

For GdiPlusRasterLayer, I founds we support WrapDateLine in development edition, and it should be supported in V10.

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [March 22, 2018, 11:40am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/9 "2018-03-22T11:40:25Z")

</div>

Hi Ethan,  
Thanks for your reply.  
1.Once GraticuleAdornmentLayer issue of WrapDateline resolved. Just let me know.  
2.we have restriction to go with only V9. so can you please fix WrapDateLine in GdiPlusRasterLayer also.that one will helpful for us.

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [April 3, 2018, 6:47am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/10 "2018-04-03T06:47:29Z")

</div>

Hi Riyaz,

1. It looks your data is under decimal degree, so our developer switch code to decimal degree and the graticule works well there. So does it necessary to re-projection the layer to meter? Our developer will go on working to solve the problem that it don’t works under meter.

2. I double check this with our development team, they had already frozen the V9 release, the code won’t get any changed unless heavy bug, this function is an enhancement after V9 frozen, so it won’t be added back to V9 release version. Please choose the V9 development version dlls or V10 dlls.

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [April 3, 2018, 7:55am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/11 "2018-04-03T07:55:59Z")

</div>

Hi Ethan,  
1. Map data having in Meter. So you please have to fix by Meter.  
2. Ok i will check it.

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [April 10, 2018, 6:35am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/12 "2018-04-10T06:35:19Z")

</div>

Hi Ethan,  
Greetings of the Day.  
I checked in Thinkgeo Web Edition Version 10.1.0.0 for graticule feature layer wrap dateline. But it’s not wrap while in projection.

Please check below sample for your reference.  
[Graticule wrap.zip](https://community.thinkgeo.com/uploads/default/original/3X/4/d/4d7e3f49c5d7644fd9320978b1b4dbcad96df599.zip) (3.6 KB)

But if i set wraping mode to overlay with out projection, it’s working fine. I must need to apply projection.  
So please fix it ASAP.

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [April 13, 2018, 3:43am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/13 "2018-04-13T03:43:21Z")

</div>

Hi Ethan,  
Even I cross checked in Web Edition latest Version(10) about Graticule wrap functionality. But it didn’t work.  
It’s general reminder for graticule wrap in V10.

Please fix it.

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [April 13, 2018, 7:38am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/14 "2018-04-13T07:38:09Z")

</div>

Hi Riyaz,

The version you choose hadn’t solved this problem, our developer should had fixed that now, please upgrade your package to the version ThinkGeo.MapSuite.Layers.Graticule 11.0.0-beta006 to see whether it works for you.

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [April 25, 2018, 9:00am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/15 "2018-04-25T09:00:15Z")

</div>

Hi Ethan,  
1. I am using V11(11.0.0.0) beta version. Tested for Graticule Wrap DateLine.

 ![](https://community.thinkgeo.com/uploads/default/original/3X/1/6/16638029f1cae4b6b6fd7310cb9e0602467f525e.png)

Code.

LineStyle customDashLineStyle = LineStyles.CreateSimpleLineStyle(GeoColors.Gray, 1, LineDashStyle.Custom, true);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);

```
                        GraticuleFeatureLayer graticuleAdornmentLayer = new GraticuleFeatureLayer(_proj);
                        graticuleAdornmentLayer.WrappingMode = WrappingMode.WrapDateline;
                        graticuleAdornmentLayer.WrappingExtent = _proj.ConvertToExternalProjection(new RectangleShape(-180, 90, 180, -90));
                        graticuleAdornmentLayer.GraticuleLineStyle = customDashLineStyle;

                        LayerOverlay graticuleAdornmentLayerOverlay = new LayerOverlay("GraticuleAdornmentOverlay");
                        graticuleAdornmentLayerOverlay.TileType = TileType.SingleTile;
                        graticuleAdornmentLayerOverlay.IsBaseOverlay = false;
                        graticuleAdornmentLayerOverlay.Layers.Add("GraticuleAdornmentLayer", graticuleAdornmentLayer);
                        wfMap.CustomOverlays.Add(graticuleAdornmentLayerOverlay);

 2. Can please tell me, when V11 full version will release.

```

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [April 27, 2018, 11:00am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/16 "2018-04-27T11:00:47Z")

</div>

Hi Riyaz,

Our developer should fixed it, please view attached sample.

[Graticule\_20180427.zip](https://community.thinkgeo.com/uploads/default/original/3X/4/3/43f495ce68da6fb7e76b4dc98c48a7a2f5f98159.zip) (1.7 MB)

Our next release should be in June.

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [May 10, 2018, 11:13am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/17 "2018-05-10T11:13:08Z")

</div>

Hi Ethan,  
I tried to use WrapDateline mode to NativeImageRasterLayer in Thinkgeo webedition v10.  
But it’s not work out. it’s getting some error message.

![](https://community.thinkgeo.com/uploads/default/original/3X/d/4/d47de8e8f08c67b2f8ce1060fc39d61bf453d413.png)

Code:  
NativeImageRasterLayer rasterRadar = new NativeImageRasterLayer(sSavedImage, \_proj.ConvertToExternalProjection(new RectangleShape(-127.6622, 50.4, -66.63, 21.56)));  
rasterRadar.Name = “RadarLayer”;  
rasterRadar.WrappingMode = WrappingMode.WrapDateline;  
rasterRadar.WrappingExtent = \_proj.ConvertToExternalProjection(new RectangleShape(-180, 90, 180, -90));  
ol\_Radar.Layers.Add(“RadarLayer”, rasterRadar);

Please check it.

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [May 11, 2018, 9:41am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/18 "2018-05-11T09:41:02Z")

</div>

Hi Riyaz,

I did a sample to reproduce it, but it looks the wrapdateline works well.

I guess that’s maybe related with the data, could you please build a sample with your data and we can research based on it?

As below is my test code:

```
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Map1.MapUnit = GeographyUnit.Meter;

            Proj4Projection _proj = new Proj4Projection(4326, 3857);
            _proj.Open();

            string path = @"D:\test.tif";
            NativeImageRasterLayer rasterRadar = new NativeImageRasterLayer(path, _proj.ConvertToExternalProjection(new RectangleShape(-127.6622, 50.4, -66.63, 21.56)));

            rasterRadar.Name = "RadarLayer";
            rasterRadar.WrappingMode = WrappingMode.WrapDateline;
            rasterRadar.WrappingExtent = _proj.ConvertToExternalProjection(new RectangleShape(-180, 90, 180, -90));

            LayerOverlay overlay = new LayerOverlay();
            overlay.Layers.Add("RadarLayer", rasterRadar);

            rasterRadar.Open();
            Map1.CurrentExtent = rasterRadar.GetBoundingBox();

            Map1.CustomOverlays.Add(overlay);
        }
    }

```

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [May 19, 2018, 6:03am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/19 "2018-05-19T06:03:27Z")

</div>

Hi Ethan,  
I am facing some strange issue. I am applying wrapping for all layers. Initial loading time each layer wrapping fine.  
But Some times while panning it’s coming like this.(Features are not rending correctly,it’s moving to some other place)

 ![](https://community.thinkgeo.com/uploads/default/original/3X/8/f/8f910a438246c328979562c2c6d2166d1a8261de.png)

I don’t know, what’s wrong over there for it. i didn’t even using Map extent changed and mouse move events. Map is rendering automatically whenever pan or zoom it.

please check this issue for ‘Graticule Layer’.

Code:  
Proj4Projection \_proj = new Proj4Projection();  
\_proj.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);  
\_proj.ExternalProjectionParametersString = Proj4Projection.GetEsriParametersString(54004);  
LineStyle customDashLineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.FromArgb(100,0,0,255), 1, LineDashStyle.Custom, true);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);  
customDashLineStyle.CenterPen.DashPattern.Add(4f);

```
                GraticuleFeatureLayer graticuleAdornmentLayer = new GraticuleFeatureLayer(_proj);
                graticuleAdornmentLayer.WrappingMode = WrappingMode.WrapDateline;
                graticuleAdornmentLayer.WrappingExtent = _proj.ConvertToExternalProjection( new RectangleShape(-180, 90, 180, -90));
                graticuleAdornmentLayer.GraticuleLineStyle = customDashLineStyle;

                LayerOverlay graticuleAdornmentLayerOverlay = new LayerOverlay("GraticuleAdornmentOverlay",false,TileType.SingleTile);
                graticuleAdornmentLayerOverlay.TileType = TileType.SingleTile;
                graticuleAdornmentLayerOverlay.IsBaseOverlay = false;
                graticuleAdornmentLayerOverlay.Layers.Add("GraticuleAdornmentLayer", graticuleAdornmentLayer);
                wfMap.CustomOverlays.Add(graticuleAdornmentLayerOverlay);

```

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [May 21, 2018, 8:09am UTC](https://community.thinkgeo.com/t/wrapdateline-isuue/9009/20 "2018-05-21T08:09:59Z")

</div>

Hi Riyaz,

The code you attached is not very different than before, so we cannot make sure whether you still use the same data, and how to reproduce it.

Could you please let us know more about the issue? And I suggest you can modify the sample before in this post, and attach it when you met problem, so it can save the communication times.

Regards,

Ethan
