Update MainWindow.axaml

This commit is contained in:
ClemensFischer 2024-05-24 22:04:40 +02:00
parent 603a0a7e6f
commit 1e7dd235ef

View file

@ -7,9 +7,12 @@
x:Class="AvaloniaApp.MainWindow" x:Class="AvaloniaApp.MainWindow"
Title="MainWindow"> Title="MainWindow">
<Grid> <Grid>
<map:Map x:Name="map" Center="53.5,8.2" ZoomLevel="11" DoubleTapped="OnMapDoubleTapped"> <map:Map x:Name="map"
ZoomLevel="11" MinZoomLevel="3"
Center="53.5,8.2"
DoubleTapped="OnMapDoubleTapped">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#AFFFFFFF" <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#7FFFFFFF"
DataContext="{Binding MapLayer, ElementName=map}"> DataContext="{Binding MapLayer, ElementName=map}">
<ProgressBar Width="100" Height="8" Margin="4,2" VerticalAlignment="Center" <ProgressBar Width="100" Height="8" Margin="4,2" VerticalAlignment="Center"
Maximum="1" Value="{Binding LoadingProgress}"> Maximum="1" Value="{Binding LoadingProgress}">
@ -31,7 +34,7 @@
</LayoutTransformControl> </LayoutTransformControl>
</StackPanel> </StackPanel>
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Margin="6"> <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Margin="6" Background="#7FFFFFFF">
<tools:MapLayersMenuButton x:Name="mapLayersMenuButton" <tools:MapLayersMenuButton x:Name="mapLayersMenuButton"
Margin="2" ToolTip.Tip="Map Layers and Overlays" Map="{Binding ElementName=map}"> Margin="2" ToolTip.Tip="Map Layers and Overlays" Map="{Binding ElementName=map}">
<tools:MapLayerItem Text="OpenStreetMap"> <tools:MapLayerItem Text="OpenStreetMap">
@ -84,6 +87,9 @@
Description="© [terrestris GmbH &amp; Co. KG](http://ows.terrestris.de/) © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)"/> Description="© [terrestris GmbH &amp; Co. KG](http://ows.terrestris.de/) © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)"/>
</tools:MapLayerItem> </tools:MapLayerItem>
<tools:MapLayersMenuButton.MapOverlays> <tools:MapLayersMenuButton.MapOverlays>
<tools:MapLayerItem Text="Scale">
<map:MapScale HorizontalAlignment="Center" VerticalAlignment="Bottom"/>
</tools:MapLayerItem>
<tools:MapLayerItem Text="Seamarks"> <tools:MapLayerItem Text="Seamarks">
<map:MapTileLayer <map:MapTileLayer
TileSource="http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png" TileSource="http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png"
@ -107,6 +113,12 @@
<tools:MapProjectionItem Text="ETRS89 / UTM zone 32N" Projection="EPSG:25832"/> <tools:MapProjectionItem Text="ETRS89 / UTM zone 32N" Projection="EPSG:25832"/>
<tools:MapProjectionItem Text="WGS84 / Auto UTM" Projection="AUTO2:42001"/> <tools:MapProjectionItem Text="WGS84 / Auto UTM" Projection="AUTO2:42001"/>
</tools:MapProjectionsMenuButton> </tools:MapProjectionsMenuButton>
<Slider Orientation="Vertical" Margin="-4,8" Height="100"
Minimum="{Binding MinZoomLevel, ElementName=map}"
Maximum="{Binding MaxZoomLevel, ElementName=map}"
Value="{Binding TargetZoomLevel, ElementName=map}"
SmallChange="0.1"/>
</StackPanel> </StackPanel>
</map:Map> </map:Map>
</Grid> </Grid>