I’m trying to use WrappingMode.WrapDateLine with a GeoTiffRasterLayer, but it always crashes with the error:
Exception thrown: 'System.InvalidOperationException' in ThinkGeo.MapSuite.dll
And sometimes:
the input double value is out of range
The geotiff can be downloaded from this link:
https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/raster/NE2_HR_LC_SR_W_DR.zip ~300 mb. It contains a .prj and .tfw file as well;
I threw together a quick app to show the issue:
using System.Windows;
using ThinkGeo.MapSuite;
using ThinkGeo.MapSuite.Drawing;
using ThinkGeo.MapSuite.Layers;
using ThinkGeo.MapSuite.Shapes;
using ThinkGeo.MapSuite.Wpf;
namespace WpfApp2
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            string baseMapPath = @"D:\Downloads\NE2_HR_LC_SR_W_DR\NE2_HR_LC_SR_W_DR.tif";
            var worldOverlay = new LayerOverlay(); //holds the background world/ocean layer
            var worldLayer = new GeoTiffRasterLayer(baseMapPath, @"D:\Downloads\NE2_HR_LC_SR_W_DR\NE2_HR_LC_SR_W_DR.tfw");
            worldOverlay.Layers.Add("worldlayer", worldLayer);
            WpfMap map = new WpfMap();
            map.Overlays.Add(worldOverlay);
            worldOverlay.TransitionEffect = TransitionEffect.Stretch;
            worldLayer.DrawingQuality = DrawingQuality.HighSpeed;
            worldLayer.WrappingMode = WrappingMode.WrapDateline;
            worldLayer.WrappingExtent = worldLayer.GetBoundingBox();
            worldOverlay.TileType = TileType.MultipleTile;
            worldOverlay.RenderMode = RenderMode.GdiPlus;
            worldOverlay.DrawingQuality = DrawingQuality.HighSpeed;
            worldOverlay.WrappingExtent = worldLayer.GetBoundingBox();
            worldOverlay.WrappingMode = WrappingMode.WrapDateline;
            contentc.Content = map;
            map.MapUnit = GeographyUnit.DecimalDegree;
            map.MapResizeMode = MapResizeMode.PreserveScaleAndCenter;
            map.Background = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.LightBlue);
            map.CurrentExtent = worldLayer.GetBoundingBox();
            map.MaximumScale = 99999999;
            map.MapTools.Logo.IsEnabled = false;
        }
    }
}
<Window x:Class="WpfApp2.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <ContentControl Name="contentc"></ContentControl>
    </Grid>
</Window>