mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
35 lines
1.5 KiB
XML
35 lines
1.5 KiB
XML
<Window x:Class="ProjectionDemo.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:map="clr-namespace:MapControl;assembly=MapControl.WPF"
|
|
Title="XAML MapControl - Projection Demo" Height="600" Width="800"
|
|
Loaded="Window_Loaded">
|
|
<DockPanel>
|
|
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
|
|
<ComboBox Margin="2"
|
|
ItemsSource="{Binding Projections}"
|
|
SelectedItem="{Binding CurrentProjection}"
|
|
DisplayMemberPath="CrsId"/>
|
|
<ComboBox Margin="2"
|
|
ItemsSource="{Binding Layers}"
|
|
SelectedValue="{Binding CurrentLayer}"
|
|
SelectedValuePath="Value"
|
|
DisplayMemberPath="Key"/>
|
|
</StackPanel>
|
|
|
|
<map:Map MaxZoomLevel="22" ZoomLevel="8" Center="50,8" MapLayer="{Binding CurrentLayer}"
|
|
MouseRightButtonUp="Map_MouseRightButtonUp">
|
|
<map:MapBase.MapProjection>
|
|
<Binding Path="CurrentProjection">
|
|
<Binding.FallbackValue>
|
|
<map:WebMercatorProjection/>
|
|
</Binding.FallbackValue>
|
|
</Binding>
|
|
</map:MapBase.MapProjection>
|
|
|
|
<map:Pushpin map:MapPanel.Location="{Binding PushpinLocation}"
|
|
Content="{Binding PushpinText}"/>
|
|
</map:Map>
|
|
</DockPanel>
|
|
</Window>
|