Sample KML Overlay

This commit is contained in:
ClemensFischer 2025-03-24 19:01:08 +01:00
parent 3d4066af55
commit 199ce7a988
2 changed files with 8 additions and 6 deletions

View file

@ -3,7 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:map="using:MapControl"
xmlns:tools="using:MapControl.UiTools"
xmlns:local="using:SampleApplication">
xmlns:local="using:SampleApplication"
Title="XAML Map Control - WinUI Sample Application">
<Grid>
<Grid.Resources>
@ -251,14 +252,14 @@
ServiceUri="http://ows.terrestris.de/osm/service"
Description="© [terrestris GmbH &amp; Co. KG](http://ows.terrestris.de/) © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)"/>
</tools:MapLayerMenuItem>
<MenuFlyoutSeparator/>
<tools:MapOverlayMenuItem Text="Sample Image">
<Image Source="10_535_330.jpg" Stretch="Fill"
map:MapPanel.BoundingBox="53.54031,8.08594,53.74871,8.43750"/>
</tools:MapOverlayMenuItem>
<tools:MapOverlayMenuItem Text="Mount Etna KML">
<map:GroundOverlay SourcePath="etna.kml"/>
</tools:MapOverlayMenuItem>
<tools:MapOverlayMenuItem x:Name="sampleOverlayMenuItem" Text="Mount Etna KML"/>
<tools:MapOverlayMenuItem Text="Seamarks">
<map:MapTileLayer
TileSource="http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png"

View file

@ -20,9 +20,10 @@ namespace SampleApplication
Closed += (s, e) => (TileImageLoader.Cache as IDisposable)?.Dispose();
InitializeComponent();
AddTestLayers();
Title = "XAML Map Control - WinUI Sample Application";
sampleOverlayMenuItem.MapLayerFactory = async () => await GroundOverlay.CreateAsync("etna.kml");
AddTestLayers();
}
partial void AddTestLayers();