mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Version 2.1.0:
- TileImageLoader with local file caching in WinRT - Location implements IEquatable - Removed Surface sample application
This commit is contained in:
parent
10527c3f0d
commit
4e0253aa70
38 changed files with 493 additions and 393 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Globalization;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
|
@ -22,14 +23,27 @@ namespace SilverlightApplication
|
|||
private void MapMouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
var location = map.ViewportPointToLocation(e.GetPosition(map));
|
||||
var longitude = Location.NormalizeLongitude(location.Longitude);
|
||||
var latString = location.Latitude < 0 ?
|
||||
string.Format(CultureInfo.InvariantCulture, "S {0:00.00000}", -location.Latitude) :
|
||||
string.Format(CultureInfo.InvariantCulture, "N {0:00.00000}", location.Latitude);
|
||||
var lonString = longitude < 0 ?
|
||||
string.Format(CultureInfo.InvariantCulture, "W {0:000.00000}", -longitude) :
|
||||
string.Format(CultureInfo.InvariantCulture, "E {0:000.00000}", longitude);
|
||||
mouseLocation.Text = latString + "\n" + lonString;
|
||||
var latitude = (int)Math.Round(location.Latitude * 60000d);
|
||||
var longitude = (int)Math.Round(Location.NormalizeLongitude(location.Longitude) * 60000d);
|
||||
var latHemisphere = 'N';
|
||||
var lonHemisphere = 'E';
|
||||
|
||||
if (latitude < 0)
|
||||
{
|
||||
latitude = -latitude;
|
||||
latHemisphere = 'S';
|
||||
}
|
||||
|
||||
if (longitude < 0)
|
||||
{
|
||||
longitude = -longitude;
|
||||
lonHemisphere = 'W';
|
||||
}
|
||||
|
||||
mouseLocation.Text = string.Format(CultureInfo.InvariantCulture,
|
||||
"{0} {1:00} {2:00.000}\n{3} {4:000} {5:00.000}",
|
||||
latHemisphere, latitude / 60000, (double)(latitude % 60000) / 1000d,
|
||||
lonHemisphere, longitude / 60000, (double)(longitude % 60000) / 1000d);
|
||||
}
|
||||
|
||||
private void TileLayerSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("2.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.0")]
|
||||
[assembly: AssemblyVersion("2.1.0")]
|
||||
[assembly: AssemblyFileVersion("2.1.0")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue