mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 23:45:05 +00:00
Added SampleApps/ProjectionDemo
This commit is contained in:
parent
e3332e44d4
commit
d603ac7e72
6 changed files with 240 additions and 0 deletions
34
SampleApps/ProjectionDemo/MainWindow.xaml
Normal file
34
SampleApps/ProjectionDemo/MainWindow.xaml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue