mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Version 1.12.1: Some cleanup and minor improvements.
This commit is contained in:
parent
4f37eaa914
commit
ed140c6d01
36 changed files with 220 additions and 194 deletions
|
|
@ -173,7 +173,7 @@ namespace ViewModel
|
|||
Interval = TimeSpan.FromSeconds(0.1)
|
||||
};
|
||||
|
||||
timer.Tick += (sender, e) =>
|
||||
timer.Tick += (s, e) =>
|
||||
{
|
||||
var p = Points.Last();
|
||||
p.Location = new Location(p.Location.Latitude + 0.001, p.Location.Longitude + 0.002);
|
||||
|
|
@ -181,7 +181,7 @@ namespace ViewModel
|
|||
if (p.Location.Latitude > 54d)
|
||||
{
|
||||
p.Name = "Stopped";
|
||||
((DispatcherTimer)sender).Stop();
|
||||
((DispatcherTimer)s).Stop();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("1.12.0")]
|
||||
[assembly: AssemblyFileVersion("1.12.0")]
|
||||
[assembly: AssemblyVersion("1.12.1")]
|
||||
[assembly: AssemblyFileVersion("1.12.1")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@
|
|||
</Style>
|
||||
<Style x:Key="PointItemStyle" TargetType="map:MapItem">
|
||||
<Setter Property="map:MapPanel.Location" Value="{Binding Location}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="map:MapItem">
|
||||
|
|
@ -84,7 +82,6 @@
|
|||
</Style>
|
||||
<Style x:Key="PushpinItemStyle" TargetType="map:MapItem">
|
||||
<Setter Property="map:MapPanel.Location" Value="{Binding Location}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
|
|
@ -157,7 +154,7 @@
|
|||
<Slider Width="100" Minimum="0" Maximum="1"
|
||||
Value="{Binding Opacity, ElementName=mapImage, Mode=TwoWay}"/>
|
||||
</StackPanel>
|
||||
<CheckBox Margin="5" VerticalAlignment="Bottom" Content="Seamarks" Click="SeamarksClick"/>
|
||||
<CheckBox Margin="5" VerticalAlignment="Bottom" Content="Seamarks" Checked="SeamarksChecked" Unchecked="SeamarksUnchecked"/>
|
||||
<ComboBox x:Name="tileLayerComboBox" Margin="5" VerticalAlignment="Bottom" Width="120" SelectionChanged="TileLayerSelectionChanged">
|
||||
<sys:String>OpenStreetMap</sys:String>
|
||||
<sys:String>OpenCycleMap</sys:String>
|
||||
|
|
|
|||
|
|
@ -39,20 +39,14 @@ namespace SilverlightApplication
|
|||
map.TileLayer = tileLayers[(string)comboBox.SelectedItem];
|
||||
}
|
||||
|
||||
private void SeamarksClick(object sender, RoutedEventArgs e)
|
||||
private void SeamarksChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var checkBox = (CheckBox)sender;
|
||||
var tileLayers = (TileLayerCollection)Resources["TileLayers"];
|
||||
var tileLayer = tileLayers["Seamarks"];
|
||||
map.TileLayers.Add((TileLayer)((TileLayerCollection)Resources["TileLayers"])["Seamarks"]);
|
||||
}
|
||||
|
||||
if ((bool)checkBox.IsChecked)
|
||||
{
|
||||
map.TileLayers.Add(tileLayer);
|
||||
}
|
||||
else
|
||||
{
|
||||
map.TileLayers.Remove(tileLayer);
|
||||
}
|
||||
private void SeamarksUnchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
map.TileLayers.Remove((TileLayer)((TileLayerCollection)Resources["TileLayers"])["Seamarks"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("1.12.0")]
|
||||
[assembly: AssemblyFileVersion("1.12.0")]
|
||||
[assembly: AssemblyVersion("1.12.1")]
|
||||
[assembly: AssemblyFileVersion("1.12.1")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@
|
|||
<HintPath>$(TargetFrameworkDirectory)System.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Windows.Browser" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@
|
|||
</Style>
|
||||
<Style x:Key="PointItemStyle" TargetType="map:MapItem">
|
||||
<Setter Property="local:BindingHelper.LocationPath" Value="Location"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
|
|
@ -104,7 +102,6 @@
|
|||
</Style>
|
||||
<Style x:Key="PushpinItemStyle" TargetType="map:MapItem">
|
||||
<Setter Property="local:BindingHelper.LocationPath" Value="Location"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="Template">
|
||||
|
|
@ -182,7 +179,7 @@
|
|||
<TextBlock Text="Image Opacity" HorizontalAlignment="Center" Foreground="Gray" FontSize="14"/>
|
||||
<Slider Margin="10,-10,10,-10" Width="200" Value="50" ValueChanged="ImageOpacitySliderValueChanged"/>
|
||||
</StackPanel>
|
||||
<CheckBox Margin="10" VerticalAlignment="Center" Content="Seamarks" Click="SeamarksClick"/>
|
||||
<CheckBox Margin="10" VerticalAlignment="Center" Content="Seamarks" Checked="SeamarksChecked" Unchecked="SeamarksUnchecked"/>
|
||||
<ComboBox x:Name="tileLayerComboBox" Margin="10" Width="200" VerticalAlignment="Center" SelectionChanged="TileLayerSelectionChanged">
|
||||
<ComboBoxItem>OpenStreetMap</ComboBoxItem>
|
||||
<ComboBoxItem>OpenCycleMap</ComboBoxItem>
|
||||
|
|
|
|||
|
|
@ -21,27 +21,21 @@ namespace StoreApplication
|
|||
}
|
||||
}
|
||||
|
||||
private void SeamarksClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var checkBox = (CheckBox)sender;
|
||||
var tileLayers = (TileLayerCollection)Resources["TileLayers"];
|
||||
var tileLayer = tileLayers["Seamarks"];
|
||||
|
||||
if ((bool)checkBox.IsChecked)
|
||||
{
|
||||
map.TileLayers.Add(tileLayer);
|
||||
}
|
||||
else
|
||||
{
|
||||
map.TileLayers.Remove(tileLayer);
|
||||
}
|
||||
}
|
||||
|
||||
private void TileLayerSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
var comboBox = (ComboBox)sender;
|
||||
var tileLayers = (TileLayerCollection)Resources["TileLayers"];
|
||||
map.TileLayer = tileLayers[(string)((ComboBoxItem)comboBox.SelectedItem).Content];
|
||||
}
|
||||
|
||||
private void SeamarksChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
map.TileLayers.Add((TileLayer)((TileLayerCollection)Resources["TileLayers"])["Seamarks"]);
|
||||
}
|
||||
|
||||
private void SeamarksUnchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
map.TileLayers.Remove((TileLayer)((TileLayerCollection)Resources["TileLayers"])["Seamarks"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("1.12.0")]
|
||||
[assembly: AssemblyFileVersion("1.12.0")]
|
||||
[assembly: AssemblyVersion("1.12.1")]
|
||||
[assembly: AssemblyFileVersion("1.12.1")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("1.12.0")]
|
||||
[assembly: AssemblyFileVersion("1.12.0")]
|
||||
[assembly: AssemblyVersion("1.12.1")]
|
||||
[assembly: AssemblyFileVersion("1.12.1")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -66,8 +66,6 @@
|
|||
</Style>
|
||||
<Style x:Key="PointItemStyle" TargetType="map:MapItem">
|
||||
<Setter Property="map:MapPanel.Location" Value="{Binding Location}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="map:MapItem">
|
||||
|
|
@ -124,7 +122,6 @@
|
|||
</MultiBinding>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
|
|
@ -224,7 +221,8 @@
|
|||
<Slider ToolTip="Image Opacity" Width="100" VerticalAlignment="Center"
|
||||
Minimum="0" Maximum="1" Value="{Binding Opacity, ElementName=mapImage}"/>
|
||||
</StackPanel>
|
||||
<CheckBox ToolTip="Seamarks Overlay" Margin="7" VerticalAlignment="Bottom" Content="Seamarks" Click="SeamarksClick"/>
|
||||
<CheckBox ToolTip="Seamarks Overlay" Margin="7" VerticalAlignment="Bottom" Content="Seamarks"
|
||||
Checked="SeamarksChecked" Unchecked="SeamarksUnchecked"/>
|
||||
<ComboBox ToolTip="Tile Layer" Margin="5" VerticalAlignment="Bottom" DisplayMemberPath="SourceName"
|
||||
SelectedIndex="0" ItemsSource="{Binding Source={StaticResource TileLayersViewSource}}"/>
|
||||
</StackPanel>
|
||||
|
|
|
|||
|
|
@ -78,19 +78,14 @@ namespace WpfApplication
|
|||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void SeamarksClick(object sender, RoutedEventArgs e)
|
||||
private void SeamarksChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var seamarks = (TileLayer)Resources["SeamarksTileLayer"];
|
||||
var checkBox = (CheckBox)sender;
|
||||
map.TileLayers.Add((TileLayer)Resources["SeamarksTileLayer"]);
|
||||
}
|
||||
|
||||
if ((bool)checkBox.IsChecked)
|
||||
{
|
||||
map.TileLayers.Add(seamarks);
|
||||
}
|
||||
else
|
||||
{
|
||||
map.TileLayers.Remove(seamarks);
|
||||
}
|
||||
private void SeamarksUnchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
map.TileLayers.Remove((TileLayer)Resources["SeamarksTileLayer"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("1.12.0")]
|
||||
[assembly: AssemblyFileVersion("1.12.0")]
|
||||
[assembly: AssemblyVersion("1.12.1")]
|
||||
[assembly: AssemblyFileVersion("1.12.1")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34003
|
||||
// Runtime Version:4.0.30319.34014
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue