Automatic default WMS Layer

This commit is contained in:
ClemensF 2020-04-19 12:47:39 +02:00
parent c915860eff
commit 7cd1ccddc1
2 changed files with 80 additions and 55 deletions

View file

@ -21,7 +21,13 @@ namespace ViewModel
{
{
"OpenStreetMap",
MapTileLayer.OpenStreetMapTileLayer
new MapTileLayer
{
SourceName = "OpenStreetMap",
Description = "© [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)",
TileSource = new TileSource { UriFormat = "https://{c}.tile.openstreetmap.org/{z}/{x}/{y}.png" },
MaxZoomLevel = 19
}
},
{
"OpenStreetMap German",
@ -29,7 +35,7 @@ namespace ViewModel
{
SourceName = "OpenStreetMap German",
Description = "© [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)",
TileSource = new TileSource { UriFormat = "http://{c}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png" },
TileSource = new TileSource { UriFormat = "https://{c}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png" },
MaxZoomLevel = 19
}
},
@ -53,16 +59,6 @@ namespace ViewModel
MaxZoomLevel = 18
}
},
{
"Seamarks",
new MapTileLayer
{
SourceName = "OpenSeaMap",
TileSource = new TileSource { UriFormat = "http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png" },
MinZoomLevel = 9,
MaxZoomLevel = 18
}
},
{
"Bing Maps Road",
new BingMapsTileLayer
@ -100,17 +96,7 @@ namespace ViewModel
new WmsImageLayer
{
Description = "© [terrestris GmbH & Co. KG](http://ows.terrestris.de/)\nData © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)",
ServiceUri = new Uri("http://ows.terrestris.de/osm/service"),
Layers = "OSM-WMS"
}
},
{
"OpenStreetMap TOPO WMS",
new WmsImageLayer
{
Description = "© [terrestris GmbH & Co. KG](http://ows.terrestris.de/)\nData © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)",
ServiceUri = new Uri("http://ows.terrestris.de/osm/service"),
Layers = "TOPO-OSM-WMS"
ServiceUri = new Uri("http://ows.terrestris.de/osm/service")
}
},
{
@ -118,8 +104,7 @@ namespace ViewModel
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"
ServiceUri = new Uri("https://sgx.geodatenzentrum.de/wms_topplus_open")
}
},
{
@ -132,9 +117,19 @@ namespace ViewModel
}
},
{
"SevenCs ChartServer",
"SevenCs ChartServer WMS",
new ChartServerLayer()
},
{
"Seamarks",
new MapTileLayer
{
SourceName = "OpenSeaMap",
TileSource = new TileSource { UriFormat = "http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png" },
MinZoomLevel = 9,
MaxZoomLevel = 18
}
},
};
private string currentMapLayerName = "OpenStreetMap";
@ -167,10 +162,9 @@ namespace ViewModel
"Stamen Terrain",
"Stamen Toner Light",
"OpenStreetMap WMS",
"OpenStreetMap TOPO WMS",
"TopPlusOpen WMS",
"TopPlusOpen WMTS",
"SevenCs ChartServer",
"SevenCs ChartServer WMS",
};
public MapLayers()