mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Version 4.9.0: Reworked MapPanel child arrangement.
This commit is contained in:
parent
0a7d0fccd2
commit
56d376c4d0
24 changed files with 326 additions and 322 deletions
|
|
@ -2,7 +2,6 @@
|
|||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
using MapControl;
|
||||
|
||||
namespace WpfApplication
|
||||
|
|
@ -13,13 +12,14 @@ namespace WpfApplication
|
|||
{
|
||||
var visibility = Visibility.Hidden;
|
||||
|
||||
if (values.Length == 2 && values[0] is Map && values[1] is Transform)
|
||||
if (values.Length == 2 && values[0] is MapBase && values[1] is Point?)
|
||||
{
|
||||
var parentMap = (Map)values[0];
|
||||
var transform = ((Transform)values[1]).Value;
|
||||
var parentMap = (MapBase)values[0];
|
||||
var position = (Point?)values[1];
|
||||
|
||||
if (transform.OffsetX >= 0d && transform.OffsetX <= parentMap.ActualWidth &&
|
||||
transform.OffsetY >= 0d && transform.OffsetY <= parentMap.ActualHeight)
|
||||
if (position.HasValue &&
|
||||
position.Value.X >= 0d && position.Value.X <= parentMap.ActualWidth &&
|
||||
position.Value.Y >= 0d && position.Value.Y <= parentMap.ActualHeight)
|
||||
{
|
||||
visibility = Visibility.Visible;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
<Setter.Value>
|
||||
<MultiBinding Converter="{StaticResource LocationToVisibilityConverter}">
|
||||
<Binding Path="(map:MapPanel.ParentMap)" RelativeSource="{RelativeSource Self}"/>
|
||||
<Binding Path="RenderTransform" RelativeSource="{RelativeSource Self}"/>
|
||||
<Binding Path="(map:MapPanel.ViewportPosition)" RelativeSource="{RelativeSource Self}"/>
|
||||
</MultiBinding>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
|
@ -139,7 +139,7 @@
|
|||
map:MapPanel.BoundingBox="53.54031,8.08594,53.74871,8.43750"/>
|
||||
|
||||
<map:MapGraticule x:Name="mapGraticule" Opacity="0.6"/>
|
||||
<map:MapScale/>
|
||||
<map:MapScale HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
|
||||
|
||||
<!-- use ItemTemplate or ItemContainerStyle alternatively -->
|
||||
<map:MapItemsControl ItemsSource="{Binding Polylines}"
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
<map:Pushpin.Visibility>
|
||||
<MultiBinding Converter="{StaticResource LocationToVisibilityConverter}">
|
||||
<Binding Path="(map:MapPanel.ParentMap)" RelativeSource="{RelativeSource Self}"/>
|
||||
<Binding Path="RenderTransform" RelativeSource="{RelativeSource Self}"/>
|
||||
<Binding Path="(map:MapPanel.ViewportPosition)" RelativeSource="{RelativeSource Self}"/>
|
||||
</MultiBinding>
|
||||
</map:Pushpin.Visibility>
|
||||
</map:Pushpin>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("© 2018 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("4.7.0")]
|
||||
[assembly: AssemblyFileVersion("4.7.0")]
|
||||
[assembly: AssemblyVersion("4.9.0")]
|
||||
[assembly: AssemblyFileVersion("4.9.0")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue