Version 1.2.0: Added classes MapShape, MapRectangle and MapImage.

This commit is contained in:
ClemensF 2013-04-12 19:59:16 +02:00
parent ec27d16119
commit 9b218ef376
45 changed files with 846 additions and 565 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -107,6 +107,8 @@
<map:MapBase.Center>
<map:Location Latitude="53.5" Longitude="8.2"/>
</map:MapBase.Center>
<map:MapImage x:Name="mapImage" South="53.54031" North="53.74871" West="8.08594" East="8.43750"
Source="10_535_330.jpg" Opacity=".5"/>
<map:MapGraticule Foreground="Black" Opacity="0.6"/>
<!-- use ItemTemplate or ItemContainerStyle alternatively -->
@ -145,16 +147,25 @@
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Name="mouseLocation" Margin="4" VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
<Slider Margin="10,0,10,0" Width="200" SmallChange="0.1"
Minimum="{Binding MinZoomLevel, ElementName=map}"
Maximum="{Binding MaxZoomLevel, ElementName=map}"
Value="{Binding TargetZoomLevel, ElementName=map, Mode=TwoWay}"/>
<Slider Margin="10,0,10,0" Width="200" Minimum="0" Maximum="360" SmallChange="5" LargeChange="45"
Value="{Binding Heading, ElementName=map, Mode=TwoWay}"/>
<StackPanel Margin="5">
<TextBlock Text="Zoom Level" HorizontalAlignment="Center" Foreground="Gray" FontSize="14"/>
<Slider Margin="10,-10,10,-10" Width="200" SmallChange="0.1"
Minimum="{Binding MinZoomLevel, ElementName=map}"
Maximum="{Binding MaxZoomLevel, ElementName=map}"
Value="{Binding TargetZoomLevel, ElementName=map, Mode=TwoWay}"/>
</StackPanel>
<StackPanel Margin="5">
<TextBlock Text="Heading" HorizontalAlignment="Center" Foreground="Gray" FontSize="14"/>
<Slider Margin="10,-10,10,-10" Width="200" Minimum="0" Maximum="360" SmallChange="5" LargeChange="45"
Value="{Binding Heading, ElementName=map, Mode=TwoWay}"/>
</StackPanel>
<StackPanel Margin="5">
<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"/>
<ComboBox Margin="10" Width="200" SelectedIndex="0" SelectionChanged="TileLayerSelectionChanged">
<ComboBox Margin="10" Width="200" VerticalAlignment="Center" SelectedIndex="0" SelectionChanged="TileLayerSelectionChanged">
<ComboBoxItem>OpenStreetMap</ComboBoxItem>
<ComboBoxItem>OpenCycleMap</ComboBoxItem>
<ComboBoxItem>OCM Transport</ComboBoxItem>

View file

@ -3,7 +3,7 @@ using System;
using System.Collections.Generic;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
using Windows.UI.Xaml.Controls.Primitives;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
@ -24,7 +24,7 @@ namespace StoreApplication
{
this.InitializeComponent();
ICollection<object> polylines = (ICollection<object>)Resources["Polylines"];
var polylines = (ICollection<object>)Resources["Polylines"];
polylines.Add(
new SamplePolyline
{
@ -36,7 +36,7 @@ namespace StoreApplication
Locations = LocationCollection.Parse("53.5978,8.1212 53.6018,8.1494 53.5859,8.1554 53.5852,8.1531 53.5841,8.1539 53.5802,8.1392 53.5826,8.1309 53.5867,8.1317 53.5978,8.1212")
});
ICollection<object> points = (ICollection<object>)Resources["Points"];
var points = (ICollection<object>)Resources["Points"];
points.Add(
new SamplePoint
{
@ -75,7 +75,7 @@ namespace StoreApplication
});
points.Add(movingPoint);
ICollection<object> pushpins = (ICollection<object>)Resources["Pushpins"];
var pushpins = (ICollection<object>)Resources["Pushpins"];
pushpins.Add(
new SamplePoint
{
@ -101,8 +101,7 @@ namespace StoreApplication
Location = new Location(53.5207, 8.2323)
});
DispatcherTimer timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromSeconds(0.1);
var timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(0.1) };
timer.Tick += MovePoint;
timer.Start();
}
@ -118,13 +117,12 @@ namespace StoreApplication
}
}
/// <summary>
/// Invoked when this page is about to be displayed in a Frame.
/// </summary>
/// <param name="e">Event data that describes how this page was reached. The Parameter
/// property is typically used to configure the page.</param>
protected override void OnNavigatedTo(NavigationEventArgs e)
private void ImageOpacitySliderValueChanged(object sender, RangeBaseValueChangedEventArgs e)
{
if (mapImage != null)
{
mapImage.Opacity = e.NewValue / 100;
}
}
private void SeamarksClick(object sender, RoutedEventArgs e)

View file

@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCopyright("Copyright © 2013 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.1.10")]
[assembly: AssemblyFileVersion("1.1.10")]
[assembly: AssemblyVersion("1.2.0")]
[assembly: AssemblyFileVersion("1.2.0")]
[assembly: ComVisible(false)]

View file

@ -50,6 +50,7 @@
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="10_535_330.jpg" />
<Content Include="Assets\Logo.png" />
<Content Include="Assets\SmallLogo.png" />
<Content Include="Assets\SplashScreen.png" />