mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-03-30 18:15:26 +02:00
Test WMS FeatureInfo
This commit is contained in:
parent
1ccfbb28a4
commit
448177418e
|
|
@ -117,6 +117,7 @@
|
||||||
MinZoomLevel="2" MaxZoomLevel="21" ZoomLevel="11"
|
MinZoomLevel="2" MaxZoomLevel="21" ZoomLevel="11"
|
||||||
Center="53.5,8.2" ManipulationMode="All"
|
Center="53.5,8.2" ManipulationMode="All"
|
||||||
MouseLeftButtonDown="MapMouseLeftButtonDown"
|
MouseLeftButtonDown="MapMouseLeftButtonDown"
|
||||||
|
MouseRightButtonDown="MapMouseRightButtonDown"
|
||||||
MouseMove="MapMouseMove" MouseLeave="MapMouseLeave"
|
MouseMove="MapMouseMove" MouseLeave="MapMouseLeave"
|
||||||
ManipulationInertiaStarting="MapManipulationInertiaStarting">
|
ManipulationInertiaStarting="MapManipulationInertiaStarting">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
using MapControl.Caching;
|
using MapControl.Caching;
|
||||||
using MapControl.UiTools;
|
using MapControl.UiTools;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
@ -74,6 +75,14 @@ namespace SampleApplication
|
||||||
map.TargetHeading = 0d;
|
map.TargetHeading = 0d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void MapMouseRightButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (map.MapLayer is WmsImageLayer wmsLayer)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(await wmsLayer.GetFeatureInfoAsync(e.GetPosition(map)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void MapMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void MapMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.ClickCount == 2)
|
if (e.ClickCount == 2)
|
||||||
|
|
|
||||||
|
|
@ -55,9 +55,11 @@
|
||||||
<map:WmsImageLayer
|
<map:WmsImageLayer
|
||||||
x:Key="TopPlusOpenWMS"
|
x:Key="TopPlusOpenWMS"
|
||||||
ServiceUri="https://sgx.geodatenzentrum.de/wms_topplus_open"
|
ServiceUri="https://sgx.geodatenzentrum.de/wms_topplus_open"
|
||||||
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)"/>
|
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)"
|
||||||
|
RelativeImageSize="1.2"/>
|
||||||
<map:WmsImageLayer
|
<map:WmsImageLayer
|
||||||
x:Key="OpenStreetMapWMS"
|
x:Key="OpenStreetMapWMS"
|
||||||
ServiceUri="http://ows.terrestris.de/osm/service"
|
ServiceUri="http://ows.terrestris.de/osm/service"
|
||||||
Description="© [terrestris GmbH & Co. KG](http://ows.terrestris.de/) © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)"/>
|
Description="© [terrestris GmbH & Co. KG](http://ows.terrestris.de/) © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)"
|
||||||
|
RelativeImageSize="1.2"/>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Loading…
Reference in a new issue