Version 4.17.0: Added support for WMTS

This commit is contained in:
ClemensF 2020-03-20 21:29:43 +01:00
parent f1ea075047
commit f3d0dd0f74
2 changed files with 26 additions and 3 deletions

View file

@ -10,6 +10,7 @@ using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Documents;
#else
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
@ -45,7 +46,18 @@ namespace MapControl
link.Inlines.Add(new Run { Text = match.Groups[1].Value });
#if !WINDOWS_UWP
link.ToolTip = uri.ToString();
link.RequestNavigate += (s, e) => System.Diagnostics.Process.Start(e.Uri.ToString());
link.RequestNavigate += (s, e) =>
{
try
{
Process.Start(e.Uri.ToString());
}
catch (Exception ex)
{
Debug.WriteLine("{0}: {1}", e.Uri, ex);
}
};
#endif
inlines.Add(link);
}

View file

@ -114,17 +114,27 @@ namespace ViewModel
}
},
{
"SevenCs ChartServer",
new ChartServerLayer()
"TopPlusOpen WMS",
new WmsImageLayer
{
Description = "© [BKG](https://gdz.bkg.bund.de/index.php/default/webdienste/topplus-produkte/wms-topplusopen-mit-layer-fur-normalausgabe-und-druck-wms-topplus-open.html)",
ServiceUri = new Uri("https://sgx.geodatenzentrum.de/wms_topplus_open"),
Layers = "web"
}
},
{
"TopPlusOpen WMTS",
new WmtsTileLayer
{
Description = "© [BKG](https://gdz.bkg.bund.de/index.php/default/webdienste/topplus-produkte/wmts-topplusopen-wmts-topplus-open.html)",
CapabilitiesUri = new Uri("https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml"),
SourceName = "TopPlusOpen"
}
},
{
"SevenCs ChartServer",
new ChartServerLayer()
},
};
private string currentMapLayerName = "OpenStreetMap";
@ -158,6 +168,7 @@ namespace ViewModel
"Stamen Toner Light",
"OpenStreetMap WMS",
"OpenStreetMap TOPO WMS",
"TopPlusOpen WMS",
"TopPlusOpen WMTS",
"SevenCs ChartServer",
};