ThinkGeo.com    |     Documentation    |     Premium Support

WrapDateLine Isuue

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 (240.8 KB)

Thanks,
Riyaz

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

Hi Ethan,
bin folder missing. here i am attaching bin folder.
bin.zip (2.5 MB)

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

Thanks,
Riyaz

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;

Regards,

Ethan

Hi Ethan,
Thanks, it’s work out.

Thanks,
Riyaz

Hi Riyaz,

I am glad to hear that works.

Regards,

Ethan

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);

        GraticuleAdornmentLayer graticuleAdornmentLayer = new GraticuleAdornmentLayer(_proj);
        graticuleAdornmentLayer.WrappingMode = WrappingMode.WrapDateline;
        graticuleAdornmentLayer.WrappingExtent = _proj.ConvertToExternalProjection(_rectShape_WrapExtent);
        graticuleAdornmentLayer.GraticuleLineStyle = customDashLineStyle;
        wfMap.AdornmentOverlay.Layers.Add("GraticuleAdornmentLayer", graticuleAdornmentLayer);
    

Here I am attaching sample for your reference.
WrapDateLine.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

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

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

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

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

Thanks,
Riyaz

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 (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

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

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

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

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

Hi Riyaz,

Our developer should fixed it, please view attached sample.

Graticule_20180427.zip (1.7 MB)

Our next release should be in June.

Regards,

Ethan

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.

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

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

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)

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

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