Version 5.0: Reworked MapBase and MapPath

This commit is contained in:
ClemensF 2020-03-28 21:53:38 +01:00
parent 06fd31c17b
commit 49e15ce424
41 changed files with 466 additions and 1068 deletions

View file

@ -1,12 +1,11 @@
<Window
x:Class="WpfApplication.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"
xmlns:vm="clr-namespace:ViewModel"
xmlns:local="clr-namespace:WpfApplication"
Title="XAML MapControl - WPF Test Application" Height="600" Width="800"
Stylus.IsPressAndHoldEnabled="False">
<Window x:Class="WpfApplication.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"
xmlns:vm="clr-namespace:ViewModel"
xmlns:local="clr-namespace:WpfApplication"
Title="XAML MapControl - WPF Test Application" Height="600" Width="900"
Stylus.IsPressAndHoldEnabled="False">
<Window.Resources>
<local:LocationToVisibilityConverter x:Key="LocationToVisibilityConverter"/>
@ -88,7 +87,7 @@
<Setter.Value>
<MultiBinding Converter="{StaticResource LocationToVisibilityConverter}">
<Binding Path="(map:MapPanel.ParentMap)" RelativeSource="{RelativeSource Self}"/>
<Binding Path="(map:MapPanel.ViewportPosition)" RelativeSource="{RelativeSource Self}"/>
<Binding Path="(map:MapPanel.ViewPosition)" RelativeSource="{RelativeSource Self}"/>
</MultiBinding>
</Setter.Value>
</Setter>
@ -159,17 +158,17 @@
<map:Pushpin map:MapPanel.Location="35,33" Content="Cyprus"/>
<map:Pushpin map:MapPanel.Location="28.25,-16.5" Content="Tenerife"/>
<Path map:MapPanel.Location="53.5,8.2" Stroke="Blue" StrokeThickness="3" Fill="#1F007F00">
<Path.Data>
<EllipseGeometry RadiusX="1852" RadiusY="1852" Transform="{Binding ScaleRotateTransform, ElementName=map}"/>
</Path.Data>
</Path>
<map:MapPath Location="53.5,8.2" Stroke="Blue" StrokeThickness="3" Fill="#1F007F00">
<map:MapPath.Data>
<EllipseGeometry RadiusX="1852" RadiusY="1852"/>
</map:MapPath.Data>
</map:MapPath>
<map:Pushpin map:MapPanel.Location="53.5,8.2" Background="Yellow" Foreground="Blue" Content="N 53°30' E 8°12'">
<map:Pushpin.Visibility>
<MultiBinding Converter="{StaticResource LocationToVisibilityConverter}">
<Binding Path="(map:MapPanel.ParentMap)" RelativeSource="{RelativeSource Self}"/>
<Binding Path="(map:MapPanel.ViewportPosition)" RelativeSource="{RelativeSource Self}"/>
<Binding Path="(map:MapPanel.ViewPosition)" RelativeSource="{RelativeSource Self}"/>
</MultiBinding>
</map:Pushpin.Visibility>
</map:Pushpin>