From 98cdc95c5d0de94da85dc33d5d199304986bf20d Mon Sep 17 00:00:00 2001 From: ClemensF Date: Sun, 9 Aug 2015 20:04:44 +0200 Subject: [PATCH] Version 2.5.0: - moved tile rect calculation from MapBase to TileLayer - added TileLayer.ZoomLevelOffset property - Windows Universal sample application in solution MapControl VS2015 --- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../ImageFileCache.WinRT/ImageFileCache.cs | 1 + .../Properties/AssemblyInfo.cs | 4 +- MapControl VS2015.sln | 265 + MapControl/BingMapsTileLayer.cs | 2 +- MapControl/BingMapsTileSource.cs | 6 +- MapControl/HyperlinkText.cs | 6 +- .../ImageTileSource.Silverlight.WinRT.cs | 2 +- MapControl/MapBase.Silverlight.WinRT.cs | 44 +- MapControl/MapBase.WPF.cs | 46 +- MapControl/MapBase.cs | 205 +- MapControl/MapControl.WPF.csproj | 2 +- MapControl/MapGraticule.Silverlight.WinRT.cs | 3 +- MapControl/MapGraticule.cs | 2 +- MapControl/MapImage.cs | 2 +- MapControl/MapImageLayer.Silverlight.WinRT.cs | 2 +- MapControl/MapImageLayer.cs | 41 +- MapControl/MapItem.Silverlight.WinRT.cs | 2 +- .../MapItemsControl.Silverlight.WinRT.cs | 2 +- MapControl/MapOverlay.Silverlight.WinRT.cs | 32 +- MapControl/MapOverlay.cs | 2 +- MapControl/MapPanel.Silverlight.WinRT.cs | 2 +- MapControl/MapPanel.cs | 48 +- MapControl/MapPath.Silverlight.WinRT.cs | 4 +- MapControl/MapPath.cs | 2 +- MapControl/MapPolyline.Silverlight.WinRT.cs | 2 +- MapControl/MapPolyline.cs | 6 +- MapControl/MapRectangle.cs | 6 +- MapControl/MapTransform.cs | 2 +- MapControl/MatrixEx.cs | 2 +- MapControl/MercatorTransform.cs | 2 +- MapControl/PanelBase.cs | 2 +- MapControl/Properties/AssemblyInfo.cs | 4 +- MapControl/Pushpin.Silverlight.WinRT.cs | 2 +- MapControl/Tile.Silverlight.WinRT.cs | 2 +- MapControl/Tile.cs | 2 +- MapControl/TileLayer.Silverlight.WinRT.cs | 31 + MapControl/TileLayer.WPF.cs | 28 + MapControl/TileLayer.cs | 185 +- MapControl/TileSource.cs | 80 +- MapControl/WinRT/MapControl.WinRT.csproj | 16 +- MapControl/WinRT/MapControl.WinRT.xr.xml | 61 + MapControl/WinRT/Properties/AssemblyInfo.cs | 4 +- MapControl/WinRT/ReadMe.txt | 7 +- SampleApps/Common/ViewModel.cs | 2 +- .../PhoneApplication/Package.appxmanifest | 2 +- .../PhoneApplication/PhoneApplication.csproj | 4 +- .../PhoneApplication.csproj.user | 2 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../SilverlightApplication/MainPage.xaml | 10 +- .../Properties/AssemblyInfo.cs | 4 +- SampleApps/StoreApplication/MainPage.xaml | 10 +- .../StoreApplication/Package.appxmanifest | 2 +- .../Properties/AssemblyInfo.cs | 6 +- .../StoreApplication/StoreApplication.csproj | 2 +- SampleApps/UniversalApp/App.xaml | 8 + SampleApps/UniversalApp/App.xaml.cs | 49 + .../Assets/LockScreenLogo.scale-200.png | Bin 0 -> 1430 bytes .../Assets/SplashScreen.scale-200.png | Bin 0 -> 7700 bytes .../Assets/Square150x150Logo.scale-200.png | Bin 0 -> 2937 bytes .../Assets/Square44x44Logo.scale-200.png | Bin 0 -> 1647 bytes ...x44Logo.targetsize-24_altform-unplated.png | Bin 0 -> 1255 bytes SampleApps/UniversalApp/Assets/StoreLogo.png | Bin 0 -> 1451 bytes .../Assets/Wide310x150Logo.scale-200.png | Bin 0 -> 3204 bytes SampleApps/UniversalApp/BindingHelper.cs | 36 + SampleApps/UniversalApp/MainPage.xaml | 256 + SampleApps/UniversalApp/MainPage.xaml.cs | 35 + SampleApps/UniversalApp/Package.appxmanifest | 28 + .../UniversalApp/Properties/AssemblyInfo.cs | 14 + .../UniversalApp/Properties/Default.rd.xml | 31 + SampleApps/UniversalApp/UniversalApp.csproj | 167 + .../UniversalApp/UniversalApp.csproj.user | 7 + .../UniversalApp_TemporaryKey.pfx | Bin 0 -> 2454 bytes SampleApps/UniversalApp/project.json | 16 + SampleApps/UniversalApp/project.lock.json | 14573 ++++++++++++++++ SampleApps/WpfApplication/MainWindow.xaml | 30 +- .../WpfApplication/Properties/AssemblyInfo.cs | 4 +- 80 files changed, 16033 insertions(+), 456 deletions(-) create mode 100644 MapControl VS2015.sln create mode 100644 MapControl/WinRT/MapControl.WinRT.xr.xml create mode 100644 SampleApps/UniversalApp/App.xaml create mode 100644 SampleApps/UniversalApp/App.xaml.cs create mode 100644 SampleApps/UniversalApp/Assets/LockScreenLogo.scale-200.png create mode 100644 SampleApps/UniversalApp/Assets/SplashScreen.scale-200.png create mode 100644 SampleApps/UniversalApp/Assets/Square150x150Logo.scale-200.png create mode 100644 SampleApps/UniversalApp/Assets/Square44x44Logo.scale-200.png create mode 100644 SampleApps/UniversalApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png create mode 100644 SampleApps/UniversalApp/Assets/StoreLogo.png create mode 100644 SampleApps/UniversalApp/Assets/Wide310x150Logo.scale-200.png create mode 100644 SampleApps/UniversalApp/BindingHelper.cs create mode 100644 SampleApps/UniversalApp/MainPage.xaml create mode 100644 SampleApps/UniversalApp/MainPage.xaml.cs create mode 100644 SampleApps/UniversalApp/Package.appxmanifest create mode 100644 SampleApps/UniversalApp/Properties/AssemblyInfo.cs create mode 100644 SampleApps/UniversalApp/Properties/Default.rd.xml create mode 100644 SampleApps/UniversalApp/UniversalApp.csproj create mode 100644 SampleApps/UniversalApp/UniversalApp.csproj.user create mode 100644 SampleApps/UniversalApp/UniversalApp_TemporaryKey.pfx create mode 100644 SampleApps/UniversalApp/project.json create mode 100644 SampleApps/UniversalApp/project.lock.json diff --git a/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs b/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs index 5aa9cf21..d4200840 100644 --- a/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.12")] -[assembly: AssemblyFileVersion("2.4.12")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs b/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs index 7b11a963..0aa39497 100644 --- a/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.12")] -[assembly: AssemblyFileVersion("2.4.12")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs b/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs index acab422f..4a109317 100644 --- a/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.12")] -[assembly: AssemblyFileVersion("2.4.12")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache.WinRT/ImageFileCache.cs b/Caching/ImageFileCache.WinRT/ImageFileCache.cs index eb214a2b..e22af7ec 100644 --- a/Caching/ImageFileCache.WinRT/ImageFileCache.cs +++ b/Caching/ImageFileCache.WinRT/ImageFileCache.cs @@ -62,6 +62,7 @@ namespace MapControl.Caching { } + //Debug.WriteLine("Loaded cached image {0}", file.Path); return cacheItem; } diff --git a/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs b/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs index f02ed2ca..2daece9d 100644 --- a/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.12")] -[assembly: AssemblyFileVersion("2.4.12")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl VS2015.sln b/MapControl VS2015.sln new file mode 100644 index 00000000..d4fcf46f --- /dev/null +++ b/MapControl VS2015.sln @@ -0,0 +1,265 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileDbCache.WinRT", "Caching\FileDbCache.WinRT\FileDbCache.WinRT.csproj", "{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileDbCache.WPF", "Caching\FileDbCache.WPF\FileDbCache.WPF.csproj", "{EF44F661-B98A-4676-927F-85D138F82300}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageFileCache.WinRT", "Caching\ImageFileCache.WinRT\ImageFileCache.WinRT.csproj", "{F789647E-96F7-43E3-A895-FA3FE8D01260}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageFileCache.WPF", "Caching\ImageFileCache.WPF\ImageFileCache.WPF.csproj", "{86470440-FEE2-4120-AF5A-3762FB9C536F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapControl.Silverlight", "MapControl\MapControl.Silverlight.csproj", "{EB133B78-DEFF-416A-8F0C-89E54D766576}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapControl.WinRT", "MapControl\WinRT\MapControl.WinRT.csproj", "{63CEFDF7-5170-43B6-86F8-5C4A383A1615}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapControl.WPF", "MapControl\MapControl.WPF.csproj", "{226F3575-B683-446D-A2F0-181291DC8787}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhoneApplication", "SampleApps\PhoneApplication\PhoneApplication.csproj", "{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightApplication", "SampleApps\SilverlightApplication\SilverlightApplication.csproj", "{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightApplication.Web", "SampleApps\SilverlightApplication.Web\SilverlightApplication.Web.csproj", "{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApplication", "SampleApps\WpfApplication\WpfApplication.csproj", "{9949326E-9261-4F95-89B1-151F60498951}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SampleApps", "SampleApps", "{100879CC-8910-459E-856E-253D629E45DE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching", "Caching", "{AE8A7E02-0F7D-41B0-AB23-15394150ED17}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalApp", "SampleApps\UniversalApp\UniversalApp.csproj", "{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|ARM.ActiveCfg = Debug|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|ARM.Build.0 = Debug|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|x64.ActiveCfg = Debug|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|x64.Build.0 = Debug|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|x86.ActiveCfg = Debug|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|x86.Build.0 = Debug|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|Any CPU.Build.0 = Release|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|ARM.ActiveCfg = Release|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|ARM.Build.0 = Release|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|x64.ActiveCfg = Release|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|x64.Build.0 = Release|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|x86.ActiveCfg = Release|Any CPU + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|x86.Build.0 = Release|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Debug|ARM.ActiveCfg = Debug|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Debug|ARM.Build.0 = Debug|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Debug|x64.ActiveCfg = Debug|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Debug|x64.Build.0 = Debug|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Debug|x86.ActiveCfg = Debug|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Debug|x86.Build.0 = Debug|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Release|Any CPU.Build.0 = Release|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Release|ARM.ActiveCfg = Release|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Release|ARM.Build.0 = Release|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Release|x64.ActiveCfg = Release|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Release|x64.Build.0 = Release|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Release|x86.ActiveCfg = Release|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Release|x86.Build.0 = Release|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|ARM.ActiveCfg = Debug|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|ARM.Build.0 = Debug|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|x64.ActiveCfg = Debug|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|x64.Build.0 = Debug|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|x86.ActiveCfg = Debug|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|x86.Build.0 = Debug|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|Any CPU.Build.0 = Release|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|ARM.ActiveCfg = Release|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|ARM.Build.0 = Release|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|x64.ActiveCfg = Release|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|x64.Build.0 = Release|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|x86.ActiveCfg = Release|Any CPU + {F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|x86.Build.0 = Release|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|ARM.ActiveCfg = Debug|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|ARM.Build.0 = Debug|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x64.ActiveCfg = Debug|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x64.Build.0 = Debug|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x86.ActiveCfg = Debug|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x86.Build.0 = Debug|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|Any CPU.Build.0 = Release|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|ARM.ActiveCfg = Release|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|ARM.Build.0 = Release|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x64.ActiveCfg = Release|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x64.Build.0 = Release|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x86.ActiveCfg = Release|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x86.Build.0 = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|ARM.ActiveCfg = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|ARM.Build.0 = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x64.ActiveCfg = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x64.Build.0 = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x86.ActiveCfg = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x86.Build.0 = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|Any CPU.Build.0 = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|ARM.ActiveCfg = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|ARM.Build.0 = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x64.ActiveCfg = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x64.Build.0 = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x86.ActiveCfg = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x86.Build.0 = Release|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|ARM.ActiveCfg = Debug|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|ARM.Build.0 = Debug|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x64.ActiveCfg = Debug|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x64.Build.0 = Debug|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x86.ActiveCfg = Debug|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x86.Build.0 = Debug|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|Any CPU.Build.0 = Release|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|ARM.ActiveCfg = Release|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|ARM.Build.0 = Release|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x64.ActiveCfg = Release|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x64.Build.0 = Release|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x86.ActiveCfg = Release|Any CPU + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x86.Build.0 = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|Any CPU.Build.0 = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|ARM.ActiveCfg = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|ARM.Build.0 = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|x64.ActiveCfg = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|x64.Build.0 = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|x86.ActiveCfg = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|x86.Build.0 = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|Any CPU.ActiveCfg = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|Any CPU.Build.0 = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|ARM.ActiveCfg = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|ARM.Build.0 = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|x64.ActiveCfg = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|x64.Build.0 = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|x86.ActiveCfg = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|x86.Build.0 = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|ARM.ActiveCfg = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|ARM.Build.0 = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|ARM.Deploy.0 = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x64.ActiveCfg = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x64.Build.0 = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x64.Deploy.0 = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x86.ActiveCfg = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x86.Build.0 = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x86.Deploy.0 = Debug|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|Any CPU.Build.0 = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|Any CPU.Deploy.0 = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|ARM.ActiveCfg = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|ARM.Build.0 = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|ARM.Deploy.0 = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x64.ActiveCfg = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x64.Build.0 = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x64.Deploy.0 = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x86.ActiveCfg = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x86.Build.0 = Release|Any CPU + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x86.Deploy.0 = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|ARM.ActiveCfg = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|ARM.Build.0 = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x64.ActiveCfg = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x64.Build.0 = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x86.ActiveCfg = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x86.Build.0 = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|Any CPU.Build.0 = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|ARM.ActiveCfg = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|ARM.Build.0 = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x64.ActiveCfg = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x64.Build.0 = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x86.ActiveCfg = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x86.Build.0 = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|ARM.ActiveCfg = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|ARM.Build.0 = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x64.ActiveCfg = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x64.Build.0 = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x86.ActiveCfg = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x86.Build.0 = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|Any CPU.Build.0 = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|ARM.ActiveCfg = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|ARM.Build.0 = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x64.ActiveCfg = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x64.Build.0 = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x86.ActiveCfg = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x86.Build.0 = Release|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Debug|ARM.ActiveCfg = Debug|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Debug|ARM.Build.0 = Debug|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Debug|x64.ActiveCfg = Debug|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Debug|x64.Build.0 = Debug|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Debug|x86.ActiveCfg = Debug|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Debug|x86.Build.0 = Debug|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Release|Any CPU.Build.0 = Release|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Release|ARM.ActiveCfg = Release|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Release|ARM.Build.0 = Release|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Release|x64.ActiveCfg = Release|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Release|x64.Build.0 = Release|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Release|x86.ActiveCfg = Release|Any CPU + {9949326E-9261-4F95-89B1-151F60498951}.Release|x86.Build.0 = Release|Any CPU + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|Any CPU.ActiveCfg = Debug|ARM + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|ARM.ActiveCfg = Debug|ARM + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|ARM.Build.0 = Debug|ARM + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|ARM.Deploy.0 = Debug|ARM + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x64.ActiveCfg = Debug|x64 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x64.Build.0 = Debug|x64 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x64.Deploy.0 = Debug|x64 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x86.ActiveCfg = Debug|x86 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x86.Build.0 = Debug|x86 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x86.Deploy.0 = Debug|x86 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|Any CPU.ActiveCfg = Release|x86 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|ARM.ActiveCfg = Release|ARM + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|ARM.Build.0 = Release|ARM + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|ARM.Deploy.0 = Release|ARM + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x64.ActiveCfg = Release|x64 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x64.Build.0 = Release|x64 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x64.Deploy.0 = Release|x64 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x86.ActiveCfg = Release|x86 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x86.Build.0 = Release|x86 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {C7BF2B18-CC74-430B-BCB2-600304EFA3D8} = {AE8A7E02-0F7D-41B0-AB23-15394150ED17} + {EF44F661-B98A-4676-927F-85D138F82300} = {AE8A7E02-0F7D-41B0-AB23-15394150ED17} + {F789647E-96F7-43E3-A895-FA3FE8D01260} = {AE8A7E02-0F7D-41B0-AB23-15394150ED17} + {86470440-FEE2-4120-AF5A-3762FB9C536F} = {AE8A7E02-0F7D-41B0-AB23-15394150ED17} + {8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9} = {100879CC-8910-459E-856E-253D629E45DE} + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21} = {100879CC-8910-459E-856E-253D629E45DE} + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1} = {100879CC-8910-459E-856E-253D629E45DE} + {9949326E-9261-4F95-89B1-151F60498951} = {100879CC-8910-459E-856E-253D629E45DE} + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1} = {100879CC-8910-459E-856E-253D629E45DE} + EndGlobalSection +EndGlobal diff --git a/MapControl/BingMapsTileLayer.cs b/MapControl/BingMapsTileLayer.cs index d1c60151..34bf9fd4 100644 --- a/MapControl/BingMapsTileLayer.cs +++ b/MapControl/BingMapsTileLayer.cs @@ -8,7 +8,7 @@ using System.Diagnostics; using System.Globalization; using System.Net; using System.Xml; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml; using Windows.UI.Xaml.Media.Imaging; #else diff --git a/MapControl/BingMapsTileSource.cs b/MapControl/BingMapsTileSource.cs index 1e57f245..656816d7 100644 --- a/MapControl/BingMapsTileSource.cs +++ b/MapControl/BingMapsTileSource.cs @@ -31,9 +31,9 @@ namespace MapControl quadkey[z] = (char)('0' + 2 * (y % 2) + (x % 2)); } - return new Uri(UriFormat. - Replace("{subdomain}", subdomain). - Replace("{quadkey}", new string(quadkey))); + return new Uri(UriFormat + .Replace("{subdomain}", subdomain) + .Replace("{quadkey}", new string(quadkey))); } } } diff --git a/MapControl/HyperlinkText.cs b/MapControl/HyperlinkText.cs index 6c92b683..32aabbbd 100644 --- a/MapControl/HyperlinkText.cs +++ b/MapControl/HyperlinkText.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Text.RegularExpressions; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Documents; @@ -45,7 +45,7 @@ namespace MapControl link.Inlines.Add(new Run { Text = match.Groups[1].Value }); #if SILVERLIGHT link.TargetName = "_blank"; -#elif !WINDOWS_RUNTIME +#elif !NETFX_CORE link.ToolTip = uri.ToString(); link.RequestNavigate += (s, e) => System.Diagnostics.Process.Start(e.Uri.ToString()); #endif @@ -86,7 +86,7 @@ namespace MapControl { inlines = ((Paragraph)obj).Inlines; } -#if WINDOWS_RUNTIME || SILVERLIGHT +#if NETFX_CORE || SILVERLIGHT else if (obj is RichTextBlock) { var paragraph = new Paragraph(); diff --git a/MapControl/ImageTileSource.Silverlight.WinRT.cs b/MapControl/ImageTileSource.Silverlight.WinRT.cs index a1ecfa5e..7caac0d7 100644 --- a/MapControl/ImageTileSource.Silverlight.WinRT.cs +++ b/MapControl/ImageTileSource.Silverlight.WinRT.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Media.Imaging; #else diff --git a/MapControl/MapBase.Silverlight.WinRT.cs b/MapControl/MapBase.Silverlight.WinRT.cs index b1ca4cf0..3cb3052c 100644 --- a/MapControl/MapBase.Silverlight.WinRT.cs +++ b/MapControl/MapBase.Silverlight.WinRT.cs @@ -3,16 +3,16 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; using Windows.UI; using Windows.UI.Xaml; -using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Media; #else using System.Windows; -using System.Windows.Media; using System.Windows.Controls; +using System.Windows.Media; #endif namespace MapControl @@ -61,43 +61,21 @@ namespace MapControl private void OnRenderSizeChanged(object sender, SizeChangedEventArgs e) { ((RectangleGeometry)Clip).Rect = new Rect(new Point(), e.NewSize); + ResetTransformOrigin(); UpdateTransform(); } - private void SetViewportTransform(Point mapOrigin) + private void SetViewportTransform(Location origin) { - viewportTransform.Matrix = Matrix.Identity - .Translate(-mapOrigin.X, -mapOrigin.Y) + MapOrigin = mapTransform.Transform(origin); + ViewportScale = Math.Pow(2d, ZoomLevel) * TileSource.TileSize / 360d; + + viewportTransform.Matrix = + new Matrix(1d, 0d, 0d, 1d, -MapOrigin.X, -MapOrigin.Y) .Scale(ViewportScale, -ViewportScale) .Rotate(Heading) - .Translate(viewportOrigin.X, viewportOrigin.Y); - } - - private void SetTileLayerTransform() - { - var scale = Math.Pow(2d, ZoomLevel - TileZoomLevel); - - tileLayerTransform.Matrix = Matrix.Identity - .Translate(TileGrid.X * TileSource.TileSize, TileGrid.Y * TileSource.TileSize) - .Scale(scale, scale) - .Translate(tileLayerOffset.X, tileLayerOffset.Y) - .RotateAt(Heading, viewportOrigin.X, viewportOrigin.Y); ; - } - - private void SetTransformMatrixes() - { - scaleTransform.Matrix = Matrix.Identity.Scale(CenterScale, CenterScale); - rotateTransform.Matrix = Matrix.Identity.Rotate(Heading); - scaleRotateTransform.Matrix = scaleTransform.Matrix.Multiply(rotateTransform.Matrix); - } - - private Matrix GetTileIndexMatrix(double scale) - { - return viewportTransform.Matrix - .Invert() // view to map coordinates - .Translate(180d, -180d) - .Scale(scale, -scale); // map coordinates to tile indices + .Translate(ViewportOrigin.X, ViewportOrigin.Y); } } } diff --git a/MapControl/MapBase.WPF.cs b/MapControl/MapBase.WPF.cs index 6627a265..fcdfb40c 100644 --- a/MapControl/MapBase.WPF.cs +++ b/MapControl/MapBase.WPF.cs @@ -61,54 +61,22 @@ namespace MapControl protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo) { base.OnRenderSizeChanged(sizeInfo); + ResetTransformOrigin(); UpdateTransform(); } - private void SetViewportTransform(Point mapOrigin) + private void SetViewportTransform(Location origin) { - var transform = Matrix.Identity; - transform.Translate(-mapOrigin.X, -mapOrigin.Y); + MapOrigin = mapTransform.Transform(origin); + ViewportScale = Math.Pow(2d, ZoomLevel) * TileSource.TileSize / 360d; + + var transform = new Matrix(1d, 0d, 0d, 1d, -MapOrigin.X, -MapOrigin.Y); transform.Scale(ViewportScale, -ViewportScale); transform.Rotate(Heading); - transform.Translate(viewportOrigin.X, viewportOrigin.Y); + transform.Translate(ViewportOrigin.X, ViewportOrigin.Y); viewportTransform.Matrix = transform; } - - private void SetTileLayerTransform() - { - var scale = Math.Pow(2d, ZoomLevel - TileZoomLevel); - var transform = Matrix.Identity; - transform.Translate(TileGrid.X * TileSource.TileSize, TileGrid.Y * TileSource.TileSize); - transform.Scale(scale, scale); - transform.Translate(tileLayerOffset.X, tileLayerOffset.Y); - transform.RotateAt(Heading, viewportOrigin.X, viewportOrigin.Y); - - tileLayerTransform.Matrix = transform; - } - - private void SetTransformMatrixes() - { - var rotateMatrix = Matrix.Identity; - rotateMatrix.Rotate(Heading); - rotateTransform.Matrix = rotateMatrix; - - var scaleMatrix = Matrix.Identity; - scaleMatrix.Scale(CenterScale, CenterScale); - scaleTransform.Matrix = scaleMatrix; - - scaleRotateTransform.Matrix = scaleMatrix * rotateMatrix; - } - - private Matrix GetTileIndexMatrix(double scale) - { - var transform = viewportTransform.Matrix; - transform.Invert(); // view to map coordinates - transform.Translate(180d, -180d); - transform.Scale(scale, -scale); // map coordinates to tile indices - - return transform; - } } } diff --git a/MapControl/MapBase.cs b/MapControl/MapBase.cs index bd982572..b45cbc51 100644 --- a/MapControl/MapBase.cs +++ b/MapControl/MapBase.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Linq; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Media; @@ -16,24 +16,20 @@ using Windows.UI.Xaml.Media.Animation; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Threading; #endif namespace MapControl { /// - /// The map control. Draws map content provided by the TileLayers or the TileLayer property. - /// The visible map area is defined by the Center and ZoomLevel properties. The map can be rotated - /// by an angle that is given by the Heading property. - /// MapBase is a MapPanel and hence can contain map overlays like other MapPanels or MapItemsControls. + /// The map control. Renders map content provided by the TileLayer or TileLayers property. + /// The visible map area is defined by the Center and ZoomLevel properties. + /// The map can be rotated by an angle that is given by the Heading property. + /// MapBase can contain map overlay child elements like other MapPanels or MapItemsControls. /// public partial class MapBase : MapPanel { private const double MaximumZoomLevel = 22d; - public static double ZoomLevelSwitchDelta = 0d; - public static bool UpdateTilesWhileViewportChanging = true; - public static TimeSpan TileUpdateInterval = TimeSpan.FromSeconds(0.5); public static TimeSpan AnimationDuration = TimeSpan.FromSeconds(0.3); public static EasingFunctionBase AnimationEasingFunction = new QuadraticEase { EasingMode = EasingMode.EaseOut }; @@ -50,7 +46,7 @@ namespace MapControl (o, e) => ((MapBase)o).MinZoomLevelPropertyChanged((double)e.NewValue))); public static readonly DependencyProperty MaxZoomLevelProperty = DependencyProperty.Register( - "MaxZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(18d, + "MaxZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(19d, (o, e) => ((MapBase)o).MaxZoomLevelPropertyChanged((double)e.NewValue))); internal static readonly DependencyProperty CenterPointProperty = DependencyProperty.Register( @@ -58,46 +54,40 @@ namespace MapControl (o, e) => ((MapBase)o).CenterPointPropertyChanged((Point)e.NewValue))); private readonly PanelBase tileLayerPanel = new PanelBase(); - private readonly DispatcherTimer tileUpdateTimer = new DispatcherTimer { Interval = TileUpdateInterval }; private readonly MapTransform mapTransform = new MercatorTransform(); private readonly MatrixTransform viewportTransform = new MatrixTransform(); - private readonly MatrixTransform tileLayerTransform = new MatrixTransform(); - private readonly MatrixTransform scaleTransform = new MatrixTransform(); - private readonly MatrixTransform rotateTransform = new MatrixTransform(); - private readonly MatrixTransform scaleRotateTransform = new MatrixTransform(); + private readonly ScaleTransform scaleTransform = new ScaleTransform(); + private readonly RotateTransform rotateTransform = new RotateTransform(); + private readonly TransformGroup scaleRotateTransform = new TransformGroup(); private Location transformOrigin; - private Point viewportOrigin; - private Point tileLayerOffset; private PointAnimation centerAnimation; private DoubleAnimation zoomLevelAnimation; private DoubleAnimation headingAnimation; private bool internalPropertyChange; + internal Point MapOrigin { get; private set; } + internal Point ViewportOrigin { get; private set; } + public MapBase() { + Initialize(); + + scaleRotateTransform.Children.Add(scaleTransform); + scaleRotateTransform.Children.Add(rotateTransform); + Children.Add(tileLayerPanel); TileLayers = new ObservableCollection(); - - tileUpdateTimer.Tick += UpdateTiles; - Loaded += MapLoaded; - - Initialize(); } - partial void Initialize(); - partial void RemoveAnimation(DependencyProperty property); + partial void Initialize(); // Windows Runtime and Silverlight only + partial void RemoveAnimation(DependencyProperty property); // WPF only /// /// Raised when the current viewport has changed. /// public event EventHandler ViewportChanged; - /// - /// Raised when the TileZoomLevel or TileGrid properties have changed. - /// - public event EventHandler TileGridChanged; - /// /// Gets or sets the map foreground Brush. /// @@ -118,9 +108,8 @@ namespace MapControl /// /// Gets or sets optional multiple TileLayers that are used simultaneously. - /// The first element in the collection is equal to the value of the TileLayer property. - /// The additional TileLayers usually have transparent backgrounds and their IsOverlay - /// property is set to true. + /// The first element in the collection is equal to the value of the TileLayer + /// property. The additional TileLayers usually have transparent backgrounds. /// public IList TileLayers { @@ -185,7 +174,7 @@ namespace MapControl } /// - /// Gets or sets the map heading, or clockwise rotation angle in degrees. + /// Gets or sets the map heading, i.e. a clockwise rotation angle in degrees. /// public double Heading { @@ -211,25 +200,17 @@ namespace MapControl } /// - /// Gets the transformation from cartesian map coordinates to viewport coordinates. + /// Gets the transformation from cartesian map coordinates to viewport coordinates (i.e. pixels). /// - public Transform ViewportTransform + public MatrixTransform ViewportTransform { get { return viewportTransform; } } /// - /// Gets the RenderTransform to be used by TileLayers, with origin at TileGrid.X and TileGrid.Y. + /// Gets the scaling transformation from meters to viewport coordinate units at the Center location. /// - public Transform TileLayerTransform - { - get { return tileLayerTransform; } - } - - /// - /// Gets the scaling transformation from meters to viewport coordinate units (pixels) at the Center location. - /// - public Transform ScaleTransform + public ScaleTransform ScaleTransform { get { return scaleTransform; } } @@ -237,7 +218,7 @@ namespace MapControl /// /// Gets the transformation that rotates by the value of the Heading property. /// - public Transform RotateTransform + public RotateTransform RotateTransform { get { return rotateTransform; } } @@ -245,7 +226,7 @@ namespace MapControl /// /// Gets the combination of ScaleTransform and RotateTransform /// - public Transform ScaleRotateTransform + public TransformGroup ScaleRotateTransform { get { return scaleRotateTransform; } } @@ -256,26 +237,17 @@ namespace MapControl public double ViewportScale { get; private set; } /// - /// Gets the scaling factor from meters to viewport coordinate units (pixels) at the Center location. + /// Gets the scaling factor from meters to viewport coordinate units at the Center location. /// public double CenterScale { get; private set; } /// - /// Gets the zoom level to be used by TileLayers. - /// - public int TileZoomLevel { get; private set; } - - /// - /// Gets the tile grid to be used by TileLayers. - /// - public Int32Rect TileGrid { get; private set; } - - /// - /// Gets the map scale at the specified location as viewport coordinate units (pixels) per meter. + /// Gets the map scale at the specified location as viewport coordinate units per meter. /// public double GetMapScale(Location location) { - return mapTransform.RelativeScale(location) * Math.Pow(2d, ZoomLevel) * TileSource.TileSize / (TileSource.MetersPerDegree * 360d); + return mapTransform.RelativeScale(location) * + Math.Pow(2d, ZoomLevel) * TileSource.TileSize / (TileSource.MetersPerDegree * 360d); } /// @@ -296,32 +268,33 @@ namespace MapControl /// /// Sets a temporary origin location in geographic coordinates for scaling and rotation transformations. - /// This origin location is automatically removed when the Center property is set by application code. + /// This origin location is automatically reset when the Center property is set by application code. /// public void SetTransformOrigin(Location origin) { transformOrigin = origin; - viewportOrigin = LocationToViewportPoint(origin); + ViewportOrigin = LocationToViewportPoint(origin); } /// /// Sets a temporary origin point in viewport coordinates for scaling and rotation transformations. - /// This origin point is automatically removed when the Center property is set by application code. + /// This origin point is automatically reset when the Center property is set by application code. /// public void SetTransformOrigin(Point origin) { - viewportOrigin.X = Math.Min(Math.Max(origin.X, 0d), RenderSize.Width); - viewportOrigin.Y = Math.Min(Math.Max(origin.Y, 0d), RenderSize.Height); - transformOrigin = ViewportPointToLocation(viewportOrigin); + ViewportOrigin = new Point( + Math.Min(Math.Max(origin.X, 0d), RenderSize.Width), + Math.Min(Math.Max(origin.Y, 0d), RenderSize.Height)); + transformOrigin = ViewportPointToLocation(ViewportOrigin); } /// - /// Removes the temporary transform origin point set by SetTransformOrigin. + /// Resets the temporary transform origin point set by SetTransformOrigin. /// public void ResetTransformOrigin() { transformOrigin = null; - viewportOrigin = new Point(RenderSize.Width / 2d, RenderSize.Height / 2d); + ViewportOrigin = new Point(RenderSize.Width / 2d, RenderSize.Height / 2d); } /// @@ -336,7 +309,7 @@ namespace MapControl if (translation.X != 0d || translation.Y != 0d) { - Center = ViewportPointToLocation(new Point(viewportOrigin.X - translation.X, viewportOrigin.Y - translation.Y)); + Center = ViewportPointToLocation(new Point(ViewportOrigin.X - translation.X, ViewportOrigin.Y - translation.Y)); } } @@ -349,8 +322,7 @@ namespace MapControl { SetTransformOrigin(origin); - viewportOrigin.X += translation.X; - viewportOrigin.Y += translation.Y; + ViewportOrigin = new Point(ViewportOrigin.X + translation.X, ViewportOrigin.Y + translation.Y); if (rotation != 0d) { @@ -403,28 +375,6 @@ namespace MapControl } } - protected override void OnViewportChanged() - { - base.OnViewportChanged(); - - var viewportChanged = ViewportChanged; - - if (viewportChanged != null) - { - viewportChanged(this, EventArgs.Empty); - } - } - - private void MapLoaded(object sender, RoutedEventArgs e) - { - Loaded -= MapLoaded; - - if (tileLayerPanel.Children.Count == 0 && !Children.OfType().Any()) - { - TileLayer = TileLayer.Default; - } - } - private void TileLayerPropertyChanged(TileLayer tileLayer) { if (tileLayer != null) @@ -849,74 +799,23 @@ namespace MapControl } } - CenterScale = ViewportScale * mapTransform.RelativeScale(center) / TileSource.MetersPerDegree; // Pixels per meter at center latitude + CenterScale = ViewportScale * mapTransform.RelativeScale(center) / TileSource.MetersPerDegree; // pixels per meter at center latitude + scaleTransform.ScaleX = CenterScale; + scaleTransform.ScaleY = CenterScale; + rotateTransform.Angle = Heading; - SetTransformMatrixes(); OnViewportChanged(); } - private void SetViewportTransform(Location origin) + protected override void OnViewportChanged() { - var oldMapOriginX = (viewportOrigin.X - tileLayerOffset.X) / ViewportScale - 180d; - var mapOrigin = mapTransform.Transform(origin); + base.OnViewportChanged(); - ViewportScale = Math.Pow(2d, ZoomLevel) * TileSource.TileSize / 360d; - SetViewportTransform(mapOrigin); + var viewportChanged = ViewportChanged; - tileLayerOffset.X = viewportOrigin.X - (180d + mapOrigin.X) * ViewportScale; - tileLayerOffset.Y = viewportOrigin.Y - (180d - mapOrigin.Y) * ViewportScale; - - if (Math.Abs(mapOrigin.X - oldMapOriginX) > 180d) + if (viewportChanged != null) { - // immediately handle map origin leap when map center moves across 180° longitude - UpdateTiles(this, EventArgs.Empty); - } - else - { - SetTileLayerTransform(); - - if (!UpdateTilesWhileViewportChanging) - { - tileUpdateTimer.Stop(); - } - - tileUpdateTimer.Start(); - } - } - - private void UpdateTiles(object sender, object e) - { - tileUpdateTimer.Stop(); - - var zoomLevel = (int)Math.Round(ZoomLevel + ZoomLevelSwitchDelta); - var transform = GetTileIndexMatrix((double)(1 << zoomLevel) / 360d); - - // tile indices of visible rectangle - var p1 = transform.Transform(new Point(0d, 0d)); - var p2 = transform.Transform(new Point(RenderSize.Width, 0d)); - var p3 = transform.Transform(new Point(0d, RenderSize.Height)); - var p4 = transform.Transform(new Point(RenderSize.Width, RenderSize.Height)); - - // index ranges of visible tiles - var x1 = (int)Math.Floor(Math.Min(p1.X, Math.Min(p2.X, Math.Min(p3.X, p4.X)))); - var y1 = (int)Math.Floor(Math.Min(p1.Y, Math.Min(p2.Y, Math.Min(p3.Y, p4.Y)))); - var x2 = (int)Math.Floor(Math.Max(p1.X, Math.Max(p2.X, Math.Max(p3.X, p4.X)))); - var y2 = (int)Math.Floor(Math.Max(p1.Y, Math.Max(p2.Y, Math.Max(p3.Y, p4.Y)))); - var grid = new Int32Rect(x1, y1, x2 - x1 + 1, y2 - y1 + 1); - - if (TileZoomLevel != zoomLevel || TileGrid != grid) - { - TileZoomLevel = zoomLevel; - TileGrid = grid; - - SetTileLayerTransform(); - - var tileGridChanged = TileGridChanged; - - if (tileGridChanged != null) - { - tileGridChanged(this, EventArgs.Empty); - } + viewportChanged(this, EventArgs.Empty); } } } diff --git a/MapControl/MapControl.WPF.csproj b/MapControl/MapControl.WPF.csproj index 28b705fa..bf8e298c 100644 --- a/MapControl/MapControl.WPF.csproj +++ b/MapControl/MapControl.WPF.csproj @@ -1,5 +1,5 @@  - + Debug diff --git a/MapControl/MapGraticule.Silverlight.WinRT.cs b/MapControl/MapGraticule.Silverlight.WinRT.cs index e0a691d6..0a251acc 100644 --- a/MapControl/MapGraticule.Silverlight.WinRT.cs +++ b/MapControl/MapGraticule.Silverlight.WinRT.cs @@ -4,9 +4,8 @@ using System; using System.Linq; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; -using Windows.UI; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; diff --git a/MapControl/MapGraticule.cs b/MapControl/MapGraticule.cs index a89d1974..2805a19a 100644 --- a/MapControl/MapGraticule.cs +++ b/MapControl/MapGraticule.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml; #else using System.Windows; diff --git a/MapControl/MapImage.cs b/MapControl/MapImage.cs index 79ed5694..0ac524a1 100644 --- a/MapControl/MapImage.cs +++ b/MapControl/MapImage.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml; using Windows.UI.Xaml.Media; #else diff --git a/MapControl/MapImageLayer.Silverlight.WinRT.cs b/MapControl/MapImageLayer.Silverlight.WinRT.cs index 3adf2851..85762b06 100644 --- a/MapControl/MapImageLayer.Silverlight.WinRT.cs +++ b/MapControl/MapImageLayer.Silverlight.WinRT.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml; using Windows.UI.Xaml.Media.Imaging; #else diff --git a/MapControl/MapImageLayer.cs b/MapControl/MapImageLayer.cs index b8f78d21..ed12a319 100644 --- a/MapControl/MapImageLayer.cs +++ b/MapControl/MapImageLayer.cs @@ -4,7 +4,7 @@ using System; using System.Globalization; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; @@ -33,6 +33,10 @@ namespace MapControl public static readonly DependencyProperty RelativeImageSizeProperty = DependencyProperty.Register( "RelativeImageSize", typeof(double), typeof(MapImageLayer), new PropertyMetadata(1d)); + public static readonly DependencyProperty UpdateIntervalProperty = DependencyProperty.Register( + "UpdateInterval", typeof(TimeSpan), typeof(MapImageLayer), + new PropertyMetadata(TimeSpan.FromSeconds(0.5), (o, e) => ((MapImageLayer)o).updateTimer.Interval = (TimeSpan)e.NewValue)); + private readonly DispatcherTimer updateTimer; private int currentImageIndex; private bool updateInProgress; @@ -42,7 +46,7 @@ namespace MapControl Children.Add(new MapImage { Opacity = 0d }); Children.Add(new MapImage { Opacity = 0d }); - updateTimer = new DispatcherTimer { Interval = MapBase.TileUpdateInterval }; + updateTimer = new DispatcherTimer { Interval = UpdateInterval }; updateTimer.Tick += (s, e) => UpdateImage(); } @@ -69,6 +73,15 @@ namespace MapControl set { SetValue(RelativeImageSizeProperty, value); } } + /// + /// Minimum time interval between images updates. + /// + public TimeSpan UpdateInterval + { + get { return (TimeSpan)GetValue(UpdateIntervalProperty); } + set { SetValue(UpdateIntervalProperty, value); } + } + protected override void OnViewportChanged() { base.OnViewportChanged(); @@ -119,26 +132,28 @@ namespace MapControl { if (UriFormat != null && width > 0 && height > 0) { - var uri = UriFormat.Replace("{X}", width.ToString()).Replace("{Y}", height.ToString()); + var uri = UriFormat + .Replace("{X}", width.ToString()) + .Replace("{Y}", height.ToString()); if (uri.Contains("{W}") && uri.Contains("{S}") && uri.Contains("{E}") && uri.Contains("{N}")) { var p1 = ParentMap.MapTransform.Transform(new Location(south, west)); var p2 = ParentMap.MapTransform.Transform(new Location(north, east)); - uri = uri. - Replace("{W}", (TileSource.MetersPerDegree * p1.X).ToString(CultureInfo.InvariantCulture)). - Replace("{S}", (TileSource.MetersPerDegree * p1.Y).ToString(CultureInfo.InvariantCulture)). - Replace("{E}", (TileSource.MetersPerDegree * p2.X).ToString(CultureInfo.InvariantCulture)). - Replace("{N}", (TileSource.MetersPerDegree * p2.Y).ToString(CultureInfo.InvariantCulture)); + uri = uri + .Replace("{W}", (TileSource.MetersPerDegree * p1.X).ToString(CultureInfo.InvariantCulture)) + .Replace("{S}", (TileSource.MetersPerDegree * p1.Y).ToString(CultureInfo.InvariantCulture)) + .Replace("{E}", (TileSource.MetersPerDegree * p2.X).ToString(CultureInfo.InvariantCulture)) + .Replace("{N}", (TileSource.MetersPerDegree * p2.Y).ToString(CultureInfo.InvariantCulture)); } else { - uri = uri. - Replace("{w}", west.ToString(CultureInfo.InvariantCulture)). - Replace("{s}", south.ToString(CultureInfo.InvariantCulture)). - Replace("{e}", east.ToString(CultureInfo.InvariantCulture)). - Replace("{n}", north.ToString(CultureInfo.InvariantCulture)); + uri = uri + .Replace("{w}", west.ToString(CultureInfo.InvariantCulture)) + .Replace("{s}", south.ToString(CultureInfo.InvariantCulture)) + .Replace("{e}", east.ToString(CultureInfo.InvariantCulture)) + .Replace("{n}", north.ToString(CultureInfo.InvariantCulture)); } UpdateImage(west, east, south, north, new Uri(uri)); diff --git a/MapControl/MapItem.Silverlight.WinRT.cs b/MapControl/MapItem.Silverlight.WinRT.cs index 079da02b..740d97fe 100644 --- a/MapControl/MapItem.Silverlight.WinRT.cs +++ b/MapControl/MapItem.Silverlight.WinRT.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml.Controls; #else using System.Windows.Controls; diff --git a/MapControl/MapItemsControl.Silverlight.WinRT.cs b/MapControl/MapItemsControl.Silverlight.WinRT.cs index 96787344..9dc30ac2 100644 --- a/MapControl/MapItemsControl.Silverlight.WinRT.cs +++ b/MapControl/MapItemsControl.Silverlight.WinRT.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; #else diff --git a/MapControl/MapOverlay.Silverlight.WinRT.cs b/MapControl/MapOverlay.Silverlight.WinRT.cs index 8c216ae4..f0e381a5 100644 --- a/MapControl/MapOverlay.Silverlight.WinRT.cs +++ b/MapControl/MapOverlay.Silverlight.WinRT.cs @@ -2,15 +2,21 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if !NETFX_CORE +using System.Windows; +using System.Windows.Data; +using System.Windows.Media; +#else using Windows.UI.Text; using Windows.UI.Xaml; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Data; -using System.Windows.Media; + +namespace MapControl +{ + class FontStyles { public const FontStyle Normal = FontStyle.Normal; } + class FontStretches { public const FontStretch Normal = FontStretch.Normal; } +} #endif namespace MapControl @@ -21,16 +27,16 @@ namespace MapControl "FontSize", typeof(double), typeof(MapOverlay), new PropertyMetadata(10d)); public static readonly DependencyProperty FontFamilyProperty = DependencyProperty.Register( - "FontFamily", typeof(FontFamily), typeof(MapOverlay), new PropertyMetadata(default(FontFamily))); + "FontFamily", typeof(FontFamily), typeof(MapOverlay), new PropertyMetadata(null)); public static readonly DependencyProperty FontStyleProperty = DependencyProperty.Register( - "FontStyle", typeof(FontStyle), typeof(MapOverlay), new PropertyMetadata(default(FontStyle))); + "FontStyle", typeof(FontStyle), typeof(MapOverlay), new PropertyMetadata(FontStyles.Normal)); public static readonly DependencyProperty FontStretchProperty = DependencyProperty.Register( - "FontStretch", typeof(FontStretch), typeof(MapOverlay), new PropertyMetadata(default(FontStretch))); + "FontStretch", typeof(FontStretch), typeof(MapOverlay), new PropertyMetadata(FontStretches.Normal)); public static readonly DependencyProperty FontWeightProperty = DependencyProperty.Register( - "FontWeight", typeof(FontWeight), typeof(MapOverlay), new PropertyMetadata(default(FontWeight))); + "FontWeight", typeof(FontWeight), typeof(MapOverlay), new PropertyMetadata(FontWeights.Normal)); public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register( "Foreground", typeof(Brush), typeof(MapOverlay), new PropertyMetadata(null)); @@ -48,16 +54,16 @@ namespace MapControl "StrokeDashOffset", typeof(double), typeof(MapOverlay), new PropertyMetadata(0d)); public static readonly DependencyProperty StrokeDashCapProperty = DependencyProperty.Register( - "StrokeDashCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(default(PenLineCap))); + "StrokeDashCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(PenLineCap.Flat)); public static readonly DependencyProperty StrokeStartLineCapProperty = DependencyProperty.Register( - "StrokeStartLineCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(default(PenLineCap))); + "StrokeStartLineCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(PenLineCap.Flat)); public static readonly DependencyProperty StrokeEndLineCapProperty = DependencyProperty.Register( - "StrokeEndLineCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(default(PenLineCap))); + "StrokeEndLineCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(PenLineCap.Flat)); public static readonly DependencyProperty StrokeLineJoinProperty = DependencyProperty.Register( - "StrokeLineJoin", typeof(PenLineJoin), typeof(MapOverlay), new PropertyMetadata(default(PenLineJoin))); + "StrokeLineJoin", typeof(PenLineJoin), typeof(MapOverlay), new PropertyMetadata(PenLineJoin.Miter)); public static readonly DependencyProperty StrokeMiterLimitProperty = DependencyProperty.Register( "StrokeMiterLimit", typeof(double), typeof(MapOverlay), new PropertyMetadata(1d)); diff --git a/MapControl/MapOverlay.cs b/MapControl/MapOverlay.cs index 2b1e561b..f66de93e 100644 --- a/MapControl/MapOverlay.cs +++ b/MapControl/MapOverlay.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Text; using Windows.UI.Xaml.Media; #else diff --git a/MapControl/MapPanel.Silverlight.WinRT.cs b/MapControl/MapPanel.Silverlight.WinRT.cs index fcbf7e41..d6e6a1ea 100644 --- a/MapControl/MapPanel.Silverlight.WinRT.cs +++ b/MapControl/MapPanel.Silverlight.WinRT.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml; using Windows.UI.Xaml.Media; #else diff --git a/MapControl/MapPanel.cs b/MapControl/MapPanel.cs index dff6c5e1..65ec9dc6 100644 --- a/MapControl/MapPanel.cs +++ b/MapControl/MapPanel.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Media; @@ -15,9 +15,9 @@ using System.Windows.Media; namespace MapControl { /// - /// Arranges child elements on a Map at positions specified by the attached property Location, - /// which is transformed to a viewport position by ParentMap.MapTransform and ParentMap.ViewportTransform - /// and assigned to the child element's RenderTransform as a TranslateTransform. + /// Arranges child elements on a Map at positions specified by the attached property Location. + /// The Location value is transformed to a viewport position and assigned as TranslateTransform + /// to the RenderTransform of the element, either directly or as last child of a TransformGroup. /// public partial class MapPanel : PanelBase, IMapElement { @@ -42,22 +42,6 @@ namespace MapControl set { SetParentMapOverride(value); } } - protected virtual void SetParentMapOverride(MapBase map) - { - if (parentMap != null && parentMap != this) - { - parentMap.ViewportChanged -= OnViewportChanged; - } - - parentMap = map; - - if (parentMap != null && parentMap != this) - { - parentMap.ViewportChanged += OnViewportChanged; - OnViewportChanged(); - } - } - protected override Size ArrangeOverride(Size finalSize) { foreach (UIElement element in Children) @@ -78,6 +62,22 @@ namespace MapControl return finalSize; } + protected virtual void SetParentMapOverride(MapBase map) + { + if (parentMap != null && parentMap != this) + { + parentMap.ViewportChanged -= OnViewportChanged; + } + + parentMap = map; + + if (parentMap != null && parentMap != this) + { + parentMap.ViewportChanged += OnViewportChanged; + OnViewportChanged(); + } + } + protected virtual void OnViewportChanged() { foreach (UIElement element in Children) @@ -112,8 +112,6 @@ namespace MapControl if (element != null) { - var mapElement = element as IMapElement; - var parentMap = mapElement != null ? mapElement.ParentMap : GetParentMap(element); var location = e.NewValue as Location; if (location == null) @@ -125,7 +123,7 @@ namespace MapControl ArrangeElementWithLocation(element); // arrange element when Location was null before } - SetViewportPosition(element, parentMap, location); + SetViewportPosition(element, GetParentMap(element), location); } } @@ -139,9 +137,7 @@ namespace MapControl viewportPosition = parentMap.ViewportTransform.Transform(mapPosition); - var useLayoutRounding = element.GetValue(FrameworkElement.UseLayoutRoundingProperty); - - if (useLayoutRounding != null && (bool)useLayoutRounding) + if ((bool)element.GetValue(FrameworkElement.UseLayoutRoundingProperty)) { viewportPosition.X = Math.Round(viewportPosition.X); viewportPosition.Y = Math.Round(viewportPosition.Y); diff --git a/MapControl/MapPath.Silverlight.WinRT.cs b/MapControl/MapPath.Silverlight.WinRT.cs index a3e70c8b..1ce65ac7 100644 --- a/MapControl/MapPath.Silverlight.WinRT.cs +++ b/MapControl/MapPath.Silverlight.WinRT.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Shapes; @@ -30,7 +30,7 @@ namespace MapControl Stretch = Stretch.None; } - // Work-around for missing PropertyChangedCallback for the Data property. + // Workaround for missing PropertyChangedCallback for the Data property. if (data != Data) { data = Data; diff --git a/MapControl/MapPath.cs b/MapControl/MapPath.cs index 64aaa38f..00b89f97 100644 --- a/MapControl/MapPath.cs +++ b/MapControl/MapPath.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml.Media; #else using System.Windows.Media; diff --git a/MapControl/MapPolyline.Silverlight.WinRT.cs b/MapControl/MapPolyline.Silverlight.WinRT.cs index 9e1d67bf..6bbc49d1 100644 --- a/MapControl/MapPolyline.Silverlight.WinRT.cs +++ b/MapControl/MapPolyline.Silverlight.WinRT.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System.Linq; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml; using Windows.UI.Xaml.Media; #else diff --git a/MapControl/MapPolyline.cs b/MapControl/MapPolyline.cs index 75170ae5..8527a17b 100644 --- a/MapControl/MapPolyline.cs +++ b/MapControl/MapPolyline.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Collections.Specialized; -#if WINDOWS_RUNTIME +#if NETFX_CORE using System.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Media; @@ -21,7 +21,7 @@ namespace MapControl /// public partial class MapPolyline : MapPath { -#if WINDOWS_RUNTIME +#if NETFX_CORE // Binding fails on Windows Phone when property type is IEnumerable public static readonly DependencyProperty LocationsProperty = DependencyProperty.Register( "Locations", typeof(IEnumerable), typeof(MapPolyline), @@ -38,7 +38,7 @@ namespace MapControl /// /// Gets or sets the locations that define the polyline points. /// -#if !WINDOWS_RUNTIME +#if !NETFX_CORE [TypeConverter(typeof(LocationCollectionConverter))] #endif public IEnumerable Locations diff --git a/MapControl/MapRectangle.cs b/MapControl/MapRectangle.cs index 2cbd2c37..207322fd 100644 --- a/MapControl/MapRectangle.cs +++ b/MapControl/MapRectangle.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Media; @@ -94,7 +94,7 @@ namespace MapControl { var rect = new Rect(ParentMap.MapTransform.Transform(new Location(South, West)), ParentMap.MapTransform.Transform(new Location(North, East))); - var transform = ParentMap.ViewportTransform; + Transform transform = ParentMap.ViewportTransform; ScaleRect(ref rect, ref transform); @@ -109,6 +109,6 @@ namespace MapControl } } - static partial void ScaleRect(ref Rect rect, ref Transform transform); + static partial void ScaleRect(ref Rect rect, ref Transform transform); // WPF only } } diff --git a/MapControl/MapTransform.cs b/MapControl/MapTransform.cs index c78d468d..fe5aa3f5 100644 --- a/MapControl/MapTransform.cs +++ b/MapControl/MapTransform.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; #else using System.Windows; diff --git a/MapControl/MatrixEx.cs b/MapControl/MatrixEx.cs index 443e5991..dd39fc20 100644 --- a/MapControl/MatrixEx.cs +++ b/MapControl/MatrixEx.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml.Media; #else using System.Windows.Media; diff --git a/MapControl/MercatorTransform.cs b/MapControl/MercatorTransform.cs index 21e4a9d5..002e776a 100644 --- a/MapControl/MercatorTransform.cs +++ b/MapControl/MercatorTransform.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; #else using System.Windows; diff --git a/MapControl/PanelBase.cs b/MapControl/PanelBase.cs index ea723bb0..69fc860b 100644 --- a/MapControl/PanelBase.cs +++ b/MapControl/PanelBase.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; diff --git a/MapControl/Properties/AssemblyInfo.cs b/MapControl/Properties/AssemblyInfo.cs index c9af73b3..01352120 100644 --- a/MapControl/Properties/AssemblyInfo.cs +++ b/MapControl/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ using System.Windows; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.12")] -[assembly: AssemblyFileVersion("2.4.12")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/Pushpin.Silverlight.WinRT.cs b/MapControl/Pushpin.Silverlight.WinRT.cs index c3509e3d..60ea1cf4 100644 --- a/MapControl/Pushpin.Silverlight.WinRT.cs +++ b/MapControl/Pushpin.Silverlight.WinRT.cs @@ -2,7 +2,7 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml.Controls; #else using System.Windows.Controls; diff --git a/MapControl/Tile.Silverlight.WinRT.cs b/MapControl/Tile.Silverlight.WinRT.cs index 22811504..de0673a2 100644 --- a/MapControl/Tile.Silverlight.WinRT.cs +++ b/MapControl/Tile.Silverlight.WinRT.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; diff --git a/MapControl/Tile.cs b/MapControl/Tile.cs index f1ebfe30..049b8a26 100644 --- a/MapControl/Tile.cs +++ b/MapControl/Tile.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.UI.Xaml.Controls; #else using System.Windows.Controls; diff --git a/MapControl/TileLayer.Silverlight.WinRT.cs b/MapControl/TileLayer.Silverlight.WinRT.cs index aac95484..abfc6f55 100644 --- a/MapControl/TileLayer.Silverlight.WinRT.cs +++ b/MapControl/TileLayer.Silverlight.WinRT.cs @@ -2,6 +2,13 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) +using System; +#if NETFX_CORE +using Windows.UI.Xaml.Media; +#else +using System.Windows.Media; +#endif + namespace MapControl { public partial class TileLayer @@ -9,7 +16,31 @@ namespace MapControl partial void Initialize() { IsHitTestVisible = false; + MapPanel.AddParentMapHandlers(this); } + + private Matrix GetTileIndexMatrix(int zoomLevel) + { + var scale = (double)(1 << zoomLevel) / 360d; + + return parentMap.ViewportTransform.Matrix + .Invert() // view to map coordinates + .Translate(180d, -180d) + .Scale(scale, -scale); // map coordinates to tile indices + } + + private void SetRenderTransform() + { + var scale = Math.Pow(2d, parentMap.ZoomLevel - TileZoomLevel); + var offsetX = parentMap.ViewportOrigin.X - (180d + parentMap.MapOrigin.X) * parentMap.ViewportScale; + var offsetY = parentMap.ViewportOrigin.Y - (180d - parentMap.MapOrigin.Y) * parentMap.ViewportScale; + + ((MatrixTransform)RenderTransform).Matrix = + new Matrix(1d, 0d, 0d, 1d, TileRect.X * TileSource.TileSize, TileRect.Y * TileSource.TileSize) + .Scale(scale, scale) + .Translate(offsetX, offsetY) + .RotateAt(parentMap.Heading, parentMap.ViewportOrigin.X, parentMap.ViewportOrigin.Y); ; + } } } diff --git a/MapControl/TileLayer.WPF.cs b/MapControl/TileLayer.WPF.cs index ab864f11..5fa90af8 100644 --- a/MapControl/TileLayer.WPF.cs +++ b/MapControl/TileLayer.WPF.cs @@ -2,7 +2,9 @@ // © 2015 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) +using System; using System.Windows; +using System.Windows.Media; namespace MapControl { @@ -13,5 +15,31 @@ namespace MapControl UIElement.IsHitTestVisibleProperty.OverrideMetadata( typeof(TileLayer), new FrameworkPropertyMetadata(false)); } + + private Matrix GetTileIndexMatrix(int zoomLevel) + { + var scale = (double)(1 << zoomLevel) / 360d; + var transform = parentMap.ViewportTransform.Matrix; + + transform.Invert(); // view to map coordinates + transform.Translate(180d, -180d); + transform.Scale(scale, -scale); // map coordinates to tile indices + + return transform; + } + + private void SetRenderTransform() + { + var scale = Math.Pow(2d, parentMap.ZoomLevel - TileZoomLevel); + var offsetX = parentMap.ViewportOrigin.X - (180d + parentMap.MapOrigin.X) * parentMap.ViewportScale; + var offsetY = parentMap.ViewportOrigin.Y - (180d - parentMap.MapOrigin.Y) * parentMap.ViewportScale; + + var transform = new Matrix(1d, 0d, 0d, 1d, TileRect.X * TileSource.TileSize, TileRect.Y * TileSource.TileSize); + transform.Scale(scale, scale); + transform.Translate(offsetX, offsetY); + transform.RotateAt(parentMap.Heading, parentMap.ViewportOrigin.X, parentMap.ViewportOrigin.Y); + + ((MatrixTransform)RenderTransform).Matrix = transform; + } } } diff --git a/MapControl/TileLayer.cs b/MapControl/TileLayer.cs index 6d093970..56d8f340 100644 --- a/MapControl/TileLayer.cs +++ b/MapControl/TileLayer.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; -#if WINDOWS_RUNTIME +#if NETFX_CORE using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Markup; @@ -14,6 +14,8 @@ using Windows.UI.Xaml.Media; using System.Windows; using System.Windows.Markup; using System.Windows.Media; +using System.Windows.Threading; +using System.Diagnostics; #endif namespace MapControl @@ -21,14 +23,14 @@ namespace MapControl /// /// Fills a rectangular area with map tiles from a TileSource. /// -#if WINDOWS_RUNTIME +#if NETFX_CORE [ContentProperty(Name = "TileSource")] #else [ContentProperty("TileSource")] #endif public partial class TileLayer : PanelBase, IMapElement { - public static TileLayer Default + public static TileLayer OpenStreetMapTileLayer { get { @@ -54,6 +56,10 @@ namespace MapControl public static readonly DependencyProperty LogoImageProperty = DependencyProperty.Register( "LogoImage", typeof(ImageSource), typeof(TileLayer), new PropertyMetadata(null)); + public static readonly DependencyProperty ZoomLevelOffsetProperty = DependencyProperty.Register( + "ZoomLevelOffset", typeof(double), typeof(TileLayer), + new PropertyMetadata(0d, (o, e) => ((TileLayer)o).UpdateTileRect())); + public static readonly DependencyProperty MinZoomLevelProperty = DependencyProperty.Register( "MinZoomLevel", typeof(int), typeof(TileLayer), new PropertyMetadata(0)); @@ -63,15 +69,22 @@ namespace MapControl public static readonly DependencyProperty MaxParallelDownloadsProperty = DependencyProperty.Register( "MaxParallelDownloads", typeof(int), typeof(TileLayer), new PropertyMetadata(4)); + public static readonly DependencyProperty UpdateIntervalProperty = DependencyProperty.Register( + "UpdateInterval", typeof(TimeSpan), typeof(TileLayer), + new PropertyMetadata(TimeSpan.FromSeconds(0.5), (o, e) => ((TileLayer)o).updateTimer.Interval = (TimeSpan)e.NewValue)); + + public static readonly DependencyProperty UpdateWhileViewportChangingProperty = DependencyProperty.Register( + "UpdateWhileViewportChanging", typeof(bool), typeof(TileLayer), new PropertyMetadata(true)); + public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register( "Foreground", typeof(Brush), typeof(TileLayer), new PropertyMetadata(null)); public static readonly new DependencyProperty BackgroundProperty = DependencyProperty.Register( "Background", typeof(Brush), typeof(TileLayer), new PropertyMetadata(null)); - private readonly ITileImageLoader tileImageLoader; - private List tiles = new List(); + private readonly DispatcherTimer updateTimer; private MapBase parentMap; + private double mapOriginX; public TileLayer() : this(new TileImageLoader()) @@ -80,11 +93,23 @@ namespace MapControl public TileLayer(ITileImageLoader tileImageLoader) { - this.tileImageLoader = tileImageLoader; Initialize(); + + RenderTransform = new MatrixTransform(); + TileImageLoader = tileImageLoader; + Tiles = new List(); + TileZoomLevel = -1; + + updateTimer = new DispatcherTimer { Interval = UpdateInterval }; + updateTimer.Tick += (s, e) => UpdateTileRect(); } - partial void Initialize(); + partial void Initialize(); // Windows Runtime and Silverlight only + + public ITileImageLoader TileImageLoader { get; private set; } + public ICollection Tiles { get; private set; } + public Int32Rect TileRect { get; private set; } + public int TileZoomLevel { get; private set; } /// /// Provides map tile URIs or images. @@ -122,6 +147,15 @@ namespace MapControl set { SetValue(LogoImageProperty, value); } } + /// + /// Adds an offset to the Map's ZoomLevel for a relative scale between the Map and the TileLayer. + /// + public double ZoomLevelOffset + { + get { return (double)GetValue(ZoomLevelOffsetProperty); } + set { SetValue(ZoomLevelOffsetProperty, value); } + } + /// /// Minimum zoom level supported by the TileLayer. /// @@ -149,6 +183,24 @@ namespace MapControl set { SetValue(MaxParallelDownloadsProperty, value); } } + /// + /// Minimum time interval between tile updates. + /// + public TimeSpan UpdateInterval + { + get { return (TimeSpan)GetValue(UpdateIntervalProperty); } + set { SetValue(UpdateIntervalProperty, value); } + } + + /// + /// Controls if tiles are updates while the viewport is still changing. + /// + public bool UpdateWhileViewportChanging + { + get { return (bool)GetValue(UpdateWhileViewportChangingProperty); } + set { SetValue(UpdateWhileViewportChangingProperty, value); } + } + /// /// Optional foreground brush. Sets MapBase.Foreground, if not null. /// @@ -175,63 +227,110 @@ namespace MapControl { if (parentMap != null) { - parentMap.TileGridChanged -= UpdateTiles; - ClearValue(RenderTransformProperty); + parentMap.ViewportChanged -= ViewportChanged; + TileZoomLevel = -1; + UpdateTiles(true); } parentMap = value; if (parentMap != null) { - parentMap.TileGridChanged += UpdateTiles; - RenderTransform = parentMap.TileLayerTransform; + parentMap.ViewportChanged += ViewportChanged; + ViewportChanged(this, EventArgs.Empty); } - - UpdateTiles(); } } - protected virtual void UpdateTiles(bool clearTiles = false) + private void ViewportChanged(object sender, EventArgs e) { - if (tiles.Count > 0) + if (TileZoomLevel < 0 || Math.Abs(parentMap.MapOrigin.X - mapOriginX) > 180d) { - tileImageLoader.CancelLoadTiles(this); + // immediately handle map origin leap when map center moves across 180° longitude + UpdateTileRect(); + } + else + { + SetRenderTransform(); + + if (!UpdateWhileViewportChanging) + { + updateTimer.Stop(); + } + + updateTimer.Start(); + } + + mapOriginX = parentMap.MapOrigin.X; + } + + protected void UpdateTileRect() + { + updateTimer.Stop(); + + if (parentMap != null) + { + var zoomLevel = (int)Math.Round(parentMap.ZoomLevel + ZoomLevelOffset); + var transform = GetTileIndexMatrix(zoomLevel); + + // tile indices of visible rectangle + var p1 = transform.Transform(new Point(0d, 0d)); + var p2 = transform.Transform(new Point(parentMap.RenderSize.Width, 0d)); + var p3 = transform.Transform(new Point(0d, parentMap.RenderSize.Height)); + var p4 = transform.Transform(new Point(parentMap.RenderSize.Width, parentMap.RenderSize.Height)); + + // index ranges of visible tiles + var x1 = (int)Math.Floor(Math.Min(p1.X, Math.Min(p2.X, Math.Min(p3.X, p4.X)))); + var y1 = (int)Math.Floor(Math.Min(p1.Y, Math.Min(p2.Y, Math.Min(p3.Y, p4.Y)))); + var x2 = (int)Math.Floor(Math.Max(p1.X, Math.Max(p2.X, Math.Max(p3.X, p4.X)))); + var y2 = (int)Math.Floor(Math.Max(p1.Y, Math.Max(p2.Y, Math.Max(p3.Y, p4.Y)))); + var rect = new Int32Rect(x1, y1, x2 - x1 + 1, y2 - y1 + 1); + + if (TileZoomLevel != zoomLevel || TileRect != rect) + { + TileZoomLevel = zoomLevel; + TileRect = rect; + + SetRenderTransform(); + UpdateTiles(false); + } + } + } + + protected virtual void UpdateTiles(bool clearTiles) + { + if (Tiles.Count > 0) + { + TileImageLoader.CancelLoadTiles(this); } if (clearTiles) { - tiles.Clear(); + Tiles.Clear(); } SelectTiles(); Children.Clear(); - if (tiles.Count > 0) + if (Tiles.Count > 0) { - foreach (var tile in tiles) + foreach (var tile in Tiles) { Children.Add(tile.Image); } - tileImageLoader.BeginLoadTiles(this, tiles.Where(t => t.Pending)); + TileImageLoader.BeginLoadTiles(this, Tiles.Where(t => t.Pending).OrderByDescending(t => t.ZoomLevel)); } } - private void UpdateTiles(object sender, EventArgs e) - { - UpdateTiles(); - } - - private void SelectTiles() + protected void SelectTiles() { var newTiles = new List(); - if (parentMap != null && TileSource != null) + if (TileZoomLevel >= 0 && parentMap != null && TileSource != null) { - var grid = parentMap.TileGrid; - var zoomLevel = parentMap.TileZoomLevel; - var maxZoomLevel = Math.Min(zoomLevel, MaxZoomLevel); + var maxZoomLevel = Math.Min(TileZoomLevel, MaxZoomLevel); var minZoomLevel = MinZoomLevel; if (minZoomLevel < maxZoomLevel && this != parentMap.TileLayers.FirstOrDefault()) @@ -242,23 +341,23 @@ namespace MapControl for (var z = minZoomLevel; z <= maxZoomLevel; z++) { - var tileSize = 1 << (zoomLevel - z); - var x1 = (int)Math.Floor((double)grid.X / tileSize); // may be negative - var x2 = (grid.X + grid.Width - 1) / tileSize; - var y1 = Math.Max(grid.Y / tileSize, 0); - var y2 = Math.Min((grid.Y + grid.Height - 1) / tileSize, (1 << z) - 1); + var tileSize = 1 << (TileZoomLevel - z); + var x1 = (int)Math.Floor((double)TileRect.X / tileSize); // may be negative + var x2 = (TileRect.X + TileRect.Width - 1) / tileSize; + var y1 = Math.Max(TileRect.Y / tileSize, 0); + var y2 = Math.Min((TileRect.Y + TileRect.Height - 1) / tileSize, (1 << z) - 1); for (var y = y1; y <= y2; y++) { for (var x = x1; x <= x2; x++) { - var tile = tiles.FirstOrDefault(t => t.ZoomLevel == z && t.X == x && t.Y == y); + var tile = Tiles.FirstOrDefault(t => t.ZoomLevel == z && t.X == x && t.Y == y); if (tile == null) { tile = new Tile(z, x, y); - var equivalentTile = tiles.FirstOrDefault( + var equivalentTile = Tiles.FirstOrDefault( t => t.ZoomLevel == z && t.XIndex == tile.XIndex && t.Y == y && t.Image.Source != null); if (equivalentTile != null) @@ -274,18 +373,18 @@ namespace MapControl } } - tiles = newTiles; + Tiles = newTiles; } protected override Size ArrangeOverride(Size finalSize) { - if (parentMap != null) + if (TileZoomLevel >= 0) { - foreach (var tile in tiles) + foreach (var tile in Tiles) { - var tileSize = (double)(256 << (parentMap.TileZoomLevel - tile.ZoomLevel)); - var x = tileSize * tile.X - 256 * parentMap.TileGrid.X; - var y = tileSize * tile.Y - 256 * parentMap.TileGrid.Y; + var tileSize = (double)(256 << (TileZoomLevel - tile.ZoomLevel)); + var x = tileSize * tile.X - 256 * TileRect.X; + var y = tileSize * tile.Y - 256 * TileRect.Y; tile.Image.Width = tileSize; tile.Image.Height = tileSize; diff --git a/MapControl/TileSource.cs b/MapControl/TileSource.cs index 9e079555..b3e9a47a 100644 --- a/MapControl/TileSource.cs +++ b/MapControl/TileSource.cs @@ -12,7 +12,7 @@ namespace MapControl /// public partial class TileSource { - public const int TileSize = 256; + public const double TileSize = 256; public const double MetersPerDegree = 6378137d * Math.PI / 180d; // WGS 84 semi major axis private Func getUri; @@ -84,10 +84,10 @@ namespace MapControl private Uri GetBasicUri(int x, int y, int zoomLevel) { - return new Uri(uriFormat. - Replace("{x}", x.ToString()). - Replace("{y}", y.ToString()). - Replace("{z}", zoomLevel.ToString()), + return new Uri(uriFormat + .Replace("{x}", x.ToString()) + .Replace("{y}", y.ToString()) + .Replace("{z}", zoomLevel.ToString()), UriKind.RelativeOrAbsolute); } @@ -95,11 +95,11 @@ namespace MapControl { var hostIndex = (x + y) % 3; - return new Uri(uriFormat. - Replace("{c}", "abc".Substring(hostIndex, 1)). - Replace("{x}", x.ToString()). - Replace("{y}", y.ToString()). - Replace("{z}", zoomLevel.ToString()), + return new Uri(uriFormat + .Replace("{c}", "abc".Substring(hostIndex, 1)) + .Replace("{x}", x.ToString()) + .Replace("{y}", y.ToString()) + .Replace("{z}", zoomLevel.ToString()), UriKind.RelativeOrAbsolute); } @@ -107,11 +107,11 @@ namespace MapControl { var hostIndex = (x + y) % 4; - return new Uri(uriFormat. - Replace("{i}", hostIndex.ToString()). - Replace("{x}", x.ToString()). - Replace("{y}", y.ToString()). - Replace("{z}", zoomLevel.ToString()), + return new Uri(uriFormat + .Replace("{i}", hostIndex.ToString()) + .Replace("{x}", x.ToString()) + .Replace("{y}", y.ToString()) + .Replace("{z}", zoomLevel.ToString()), UriKind.RelativeOrAbsolute); } @@ -119,11 +119,11 @@ namespace MapControl { var hostIndex = (x + y) % 4 + 1; - return new Uri(uriFormat. - Replace("{n}", hostIndex.ToString()). - Replace("{x}", x.ToString()). - Replace("{y}", y.ToString()). - Replace("{z}", zoomLevel.ToString()), + return new Uri(uriFormat + .Replace("{n}", hostIndex.ToString()) + .Replace("{x}", x.ToString()) + .Replace("{y}", y.ToString()) + .Replace("{z}", zoomLevel.ToString()), UriKind.RelativeOrAbsolute); } @@ -131,10 +131,10 @@ namespace MapControl { y = (1 << zoomLevel) - 1 - y; - return new Uri(uriFormat. - Replace("{x}", x.ToString()). - Replace("{v}", y.ToString()). - Replace("{z}", zoomLevel.ToString()), + return new Uri(uriFormat + .Replace("{x}", x.ToString()) + .Replace("{v}", y.ToString()) + .Replace("{z}", zoomLevel.ToString()), UriKind.RelativeOrAbsolute); } @@ -152,9 +152,9 @@ namespace MapControl quadkey[z] = (char)('0' + 2 * (y % 2) + (x % 2)); } - return new Uri(uriFormat. - Replace("{i}", new string(quadkey[zoomLevel - 1], 1)). - Replace("{q}", new string(quadkey)), + return new Uri(uriFormat + .Replace("{i}", new string(quadkey[zoomLevel - 1], 1)) + .Replace("{q}", new string(quadkey)), UriKind.RelativeOrAbsolute); } @@ -165,12 +165,15 @@ namespace MapControl var east = MetersPerDegree * ((double)(x + 1) * tileSize - 180d); var south = MetersPerDegree * (180d - (double)(y + 1) * tileSize); var north = MetersPerDegree * (180d - (double)y * tileSize); + var imageSize = TileSize.ToString("F0"); - return new Uri(uriFormat. - Replace("{W}", west.ToString(CultureInfo.InvariantCulture)). - Replace("{S}", south.ToString(CultureInfo.InvariantCulture)). - Replace("{E}", east.ToString(CultureInfo.InvariantCulture)). - Replace("{N}", north.ToString(CultureInfo.InvariantCulture))); + return new Uri(uriFormat + .Replace("{W}", west.ToString(CultureInfo.InvariantCulture)) + .Replace("{S}", south.ToString(CultureInfo.InvariantCulture)) + .Replace("{E}", east.ToString(CultureInfo.InvariantCulture)) + .Replace("{N}", north.ToString(CultureInfo.InvariantCulture)) + .Replace("{X}", imageSize) + .Replace("{Y}", imageSize)); } private Uri GetLatLonBoundingBoxUri(int x, int y, int zoomLevel) @@ -180,12 +183,15 @@ namespace MapControl var east = (double)(x + 1) * tileSize - 180d; var south = MercatorTransform.YToLatitude(180d - (double)(y + 1) * tileSize); var north = MercatorTransform.YToLatitude(180d - (double)y * tileSize); + var imageSize = TileSize.ToString("F0"); - return new Uri(uriFormat. - Replace("{w}", west.ToString(CultureInfo.InvariantCulture)). - Replace("{s}", south.ToString(CultureInfo.InvariantCulture)). - Replace("{e}", east.ToString(CultureInfo.InvariantCulture)). - Replace("{n}", north.ToString(CultureInfo.InvariantCulture))); + return new Uri(uriFormat + .Replace("{w}", west.ToString(CultureInfo.InvariantCulture)) + .Replace("{s}", south.ToString(CultureInfo.InvariantCulture)) + .Replace("{e}", east.ToString(CultureInfo.InvariantCulture)) + .Replace("{n}", north.ToString(CultureInfo.InvariantCulture)) + .Replace("{X}", imageSize) + .Replace("{Y}", imageSize)); } } } diff --git a/MapControl/WinRT/MapControl.WinRT.csproj b/MapControl/WinRT/MapControl.WinRT.csproj index 0981cb7d..eade977d 100644 --- a/MapControl/WinRT/MapControl.WinRT.csproj +++ b/MapControl/WinRT/MapControl.WinRT.csproj @@ -23,7 +23,7 @@ full false ..\bin\Debug\ - TRACE;DEBUG;WINDOWS_RUNTIME + TRACE;DEBUG;NETFX_CORE prompt 4 @@ -31,7 +31,7 @@ none true ..\bin\Release\ - TRACE;WINDOWS_RUNTIME + TRACE;NETFX_CORE prompt 4 @@ -169,17 +169,16 @@ MapControl.snk - - - - - Designer MSBuild:Compile + + + + 12.0 @@ -198,8 +197,7 @@ - - + copy "$(ProjectDir)MapControl.WinRT.xr.xml" "$(TargetDir)" - + XAML Map Control Store Application Clemens diff --git a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs index 0a9dcb00..115a8cee 100644 --- a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.12")] -[assembly: AssemblyFileVersion("2.4.12")] -[assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] +[assembly: AssemblyConfiguration("")] [assembly: ComVisible(false)] diff --git a/SampleApps/StoreApplication/StoreApplication.csproj b/SampleApps/StoreApplication/StoreApplication.csproj index 3b79395e..99acd288 100644 --- a/SampleApps/StoreApplication/StoreApplication.csproj +++ b/SampleApps/StoreApplication/StoreApplication.csproj @@ -33,7 +33,7 @@ pdbonly true bin\Release\ - TRACE;WINDOWS_RUNTIME + TRACE;NETFX_CORE prompt 4 diff --git a/SampleApps/UniversalApp/App.xaml b/SampleApps/UniversalApp/App.xaml new file mode 100644 index 00000000..24608199 --- /dev/null +++ b/SampleApps/UniversalApp/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/SampleApps/UniversalApp/App.xaml.cs b/SampleApps/UniversalApp/App.xaml.cs new file mode 100644 index 00000000..fdbc85a7 --- /dev/null +++ b/SampleApps/UniversalApp/App.xaml.cs @@ -0,0 +1,49 @@ +using System; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Navigation; + +namespace UniversalApp +{ + sealed partial class App : Application + { + public App() + { + this.InitializeComponent(); + this.Suspending += OnSuspending; + } + + protected override void OnLaunched(LaunchActivatedEventArgs e) + { + Frame rootFrame = Window.Current.Content as Frame; + + if (rootFrame == null) + { + rootFrame = new Frame(); + rootFrame.NavigationFailed += OnNavigationFailed; + + Window.Current.Content = rootFrame; + } + + if (rootFrame.Content == null) + { + rootFrame.Navigate(typeof(MainPage), e.Arguments); + } + + Window.Current.Activate(); + } + + private void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + { + throw new Exception("Failed to load Page " + e.SourcePageType.FullName); + } + + private void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + deferral.Complete(); + } + } +} diff --git a/SampleApps/UniversalApp/Assets/LockScreenLogo.scale-200.png b/SampleApps/UniversalApp/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..735f57adb5dfc01886d137b4e493d7e97cf13af3 GIT binary patch literal 1430 zcmaJ>TTC2P7~aKltDttVHYH6u8Io4i*}3fO&d$gd*bA_<3j~&e7%8(eXJLfhS!M@! zKrliY>>6yT4+Kr95$!DoD(Qn-5TP|{V_KS`k~E6(LGS@#`v$hQo&^^BKsw3HIsZBT z_y6C2n`lK@apunKojRQ^(_P}Mgewt$(^BBKCTZ;*xa?J3wQ7~@S0lUvbcLeq1Bg4o zH-bvQi|wt~L7q$~a-gDFP!{&TQfc3fX*6=uHv* zT&1&U(-)L%Xp^djI2?~eBF2cxC@YOP$+9d?P&h?lPy-9M2UT9fg5jKm1t$m#iWE{M zIf%q9@;fyT?0UP>tcw-bLkz;s2LlKl2qeP0w zECS7Ate+Awk|KQ+DOk;fl}Xsy4o^CY=pwq%QAAKKl628_yNPsK>?A>%D8fQG6IgdJ ztnxttBz#NI_a@fk7SU`WtrpsfZsNs9^0(2a z@C3#YO3>k~w7?2hipBf{#b6`}Xw1hlG$yi?;1dDs7k~xDAw@jiI*+tc;t2Lflg&bM)0!Y;0_@=w%`LW^8DsYpS#-bLOklX9r?Ei}TScw|4DbpW%+7 zFgAI)f51s}{y-eWb|vrU-Ya!GuYKP)J7z#*V_k^Xo>4!1Yqj*m)x&0L^tg3GJbVAJ zJ-Pl$R=NAabouV=^z_t;^K*0AvFs!vYU>_<|I^#c?>>CR<(T?=%{;U=aI*SbZADLH z&(f2wz_Y0??Tf|g;?|1Znw6}6U43Q#qNRwv1vp9uFn1)V#*4p&%$mP9x&15^OaBiDS(XppT|z^>;B{PLVEbS3IFYV yGvCsSX*m literal 0 HcmV?d00001 diff --git a/SampleApps/UniversalApp/Assets/SplashScreen.scale-200.png b/SampleApps/UniversalApp/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..023e7f1feda78d5100569825acedfd213a0d84e9 GIT binary patch literal 7700 zcmeHLYj~4Yw%(;oxoEH#Kxq-eR|+VkP17b#Vk;?4QwkI+A{L04G+#<<(x#Un1#+h5>eArRq zTw$)ZvTWW_Y?bDho0nPVTh08+s`sp!j74rJTTtXIDww0SILedFv?sZ?yb@@}GN;#8 znk_b~Q(A0YR#uV4ef!osoV1M3;vQ8N$O|fStfgf$S5;ddUNv`tWtGjM;koG#N;7M< zP*84lnx(bn_KF&9Z5Ai$)#Cs3a|$OFw>WKCT$of*L7_CqQEinflT|W{JT+aKp-E0v zsxmYg)1(T>DROm+LN1eQw8}KCTp=C!$H7`PU!t9_Hw@TsTI2`udRZv*!a5`#A9hK6Y95L(CDUX&_@QxKV z_feX{UhA#ZWlvgpL$#w^D#lq`_A4AzDqd|Zv6y9PX&DNcN|l}_D^{q@GG&H^Pg583 z8FI6N8^H7b5WjGp;urW)d7F+_lcp%KsLX0viCmE(OHH+=%ZfD_=`voUuoUxFO^L;- z;!;2{g-YiiO6m4bs89OuF9!p{FGtH-f%8<2gY!h9s)4ciN%{Kh1+`}{^}M~+TDH9N z^Z5PlgVXMC&2&k*Hw^Lb9gny#ro$MOIxIt{+r)EA10$VR3 zanN8D{TUkl+v0CQ_>ZoHP<M-x#8@8ZiT#$Kh`(uRaX1g$Bg|qy$<#7 zSSAi{Nb8Y=lvNVeio+UGLCAtoLBfL`iOv`)yoJMDJBN>4IH@(l7YRF;61@>qq1iM9 zr@b#OC~SAxSle?5Pp8Z78{VO0YFr1x7kZU64Z23eLf2T2#6J_t;-E}DkB?NufZ0Ug zi?J&byXeaB-uTNVhuiM!UVQw}bZrJ3GtAETYp->!{q#zfN7D3AS9@Q7*V^85jGx#R z(QxYV(wW#F0XF9^^s>>H8pPlVJ>)3Oz z&_X8Sf@~?cH_O*cgi$U#`v`RRfv#y3m(ZpKk^5uLup+lVs$~}FZU$r_+}#hl%?g5m z-u-}-666ssp-xWQak~>PPy$mRc|~?pVSs1_@mBEXpPVfLF6(Ktf1S* zPPh@QZ=tFMs?LM2(5P3L2;l_6XX6s&cYsP1ip#eg0`ZEP0HGYh{UmS@o`MihLLvkU zgyAG0G`b1|qjxxh1(ODKFE%AP}Dq=3vK$P7TXP4GrM1kQ72!GUVMDl`rDC&2;TA}*nF z8$nQD&6ys_nc1*E7$*1S@R8$ymy(sQV}imGSedB@{!QR5P&N_H=-^o!?LsWs+2|mH z-e=)T^SvI)=_JIm7}j4;@*Z17=(#}m=~YF~z~CLI+vdAGlJDcdF$TM?CVI1%LhUrN zaa6DJ=Yh$)$k&Oz{-~8yw^GM^8prYxSxo zvI4k#ibryMa%%*8oI-5m61Koa_A_xg=(fwp0aBX{;X4Q;NXUhtaoJDo1>TqhWtn=_ zd5~chq#&6~c%8JZK#t_&J(9EVUU&upYeIovLt1>vaHe}UUq>#RGQj!EN#5+0@T`(@ z^g~>*c`VGRiSt;!$_4+0hk^I!@O3``5=sZ8IwlxWW7km1B&_t&E*u0_9UBa#VqwY* zz>nxv?FAsVnRaD(Bui=6i==BFUw0k4n$>`umU`F2l?7CYTD^)c2X+d9X&ddS9|gj? zM?knGkGCX&W8offw8aLC2$D{PjC3nVZwd4k?eZH8*mZ)U@3Qk8RDFOz_#WUA#vnzy zyP>KrCfKwSXea7}jgJjBc}PGY+4#6%lbZyjhy`5sZd_Vy6Wz;ixa?czkN}J9It1K6 zY!eu>|AwF^fwZlLAYyQI*lM@^>O>Iu6Vf6i>Q$?v!SeUS<{>UYMwz$*%Aq?w^`j{h z!$GZbhu=^D{&ET8;))LL%ZBDZkQqRd2;u~!d9bHGmLRhLDctNgYyjsuvoSZ#iVdoB z2!f--UUA#U;<{je#?cYt^{PIyKa%hW>}uepWMyAI{{Zo7?2>?$c9;whJae%oN|I-kpTQSx_C$Z&;f zi2i)qmEn=y4U0uvk)$m;zKfjPK@oc?I`}1Jzl$Q~aoKBd3kt7L#7gyt|A_qgz6ai< z=X%D1i!d2h?rHR^R8SUj&G||dkC?DT>{o#Yau<@uqVT{Xef&XG}5*E4aPk{}~ zplx&XhaV)&1EfI3Em;Bw#O5SV^c;{twb-1Rw)+=0!e_BLbd7tYmXCH0wrlOSS+~`7He8Iqx0{CN+DVit9;*6L~JAN zD&cyT)2?h}xnYmL?^)<7YyzZ3$FHU^Eg;DLqAV{#wv#Wj7S`Jdl1pX&{3(uZ?!uh} zDc$ZTNV*7le_W6}Hju~GMTxZQ1aWCeUc%!jv3MHAzt>Y-nQK%zfT*3ebDQA5b?iGn; zBjv3B+GhLTexd_(CzZDP4|#n5^~scvB6#Pk%Ho!kQ>yYw((Dv{6=$g3jT1!u6gORW zx5#`7Wy-ZHRa~IxGHdrp(bm%lf>2%J660nj$fCqN(epv@y!l9s7@k6EvxS{AMP>WY zX4$@F8^kayphIx-RGO$+LYl9YdoI5d|4#q9##`_F5Xnx`&GPzp2fB{-{P@ATw=X@~ z_|&^UMWAKD;jjBKTK(~o?cUFRK8EX=6>cXpfzg4ZpMB>*w_^8GSiT-Jp|xBOnzM+j z*09-@-~qJ(eqWq5@R4i^u4^{McCP(!3}C|v_WsTR*bIUxN(Nx`u##3B4{sE`Z`v8w zAwIG`?1~PkID~W{uDzmqH98Pew_1(;x2%8r^vY{)_&J2K)cN{W+h5+g)ZcjP&Ci#O zgy|8K@4kyMfwilHd&6TDlhb%++Pk!>9HRld6HT7gwyZGrxS$}CsD6`>6!!2K1@Mjf z(P0WYB7V_OFZyeWrbOFb>O54BNXf~K&?}3=^v;v_wT{DKr?jN^DtN&DXwX%u?s*c6`%8>WFz z7}YW^tp0bp^NriE)AB6M2l<7rn7fzePtR*omOevpfm9n?}2V*+0iW;S)C zhg`NAjL?D=W#k*$aR{>pGf~lD-rVtD;5jW1_*Jn1j1=es@Kcx4ySM_bwcQCT=d+DV z>Sz~L=Hj@(X%31nK$mWI@7d>}ORB`K(p=+`UD)+99YUGQc7y^bHZ1F(8|tL0 zdK*DT0kSXG_{BKTpP2*2PecdKV9;dq$^ZZDP;Nyq1kp-&GI5eAyZsK!e3V zK@rPy*{(`KIfo+lc878mDKk^V#`VT05}64kBtk%DgwLrOvLMj5-;*GNKv6c6pzMuL z6EP%ob|_0IW}lLRXCP2!9wWhEw3LA7iF#1O1mIZ@Z=6&bz41F;@S_GvYAG-#CW3z{ zP3+6vHhvP&A3$##Vo9$dT^#MoGg^|MDm=Bt1d2RRwSZ<;ZHICpLBv5Xs!D?BH^(9_ z7`H=N&^v|Z-%mP}wNzG{aiFCsRgwzwq!N6obW9+7(R; z(SZ=23`|`>qil!LMGG{_Heq!BD>(Y-zV9wD)}hz25JA37YR%39;kI4y9pgtcUass6 zP24}ZY$vvYeI`zy&)A_X#nY3017ap*0&jx|mVwyGhg3;!keU53a}Uhm3BZI$N$6Se zLWlAmy1S0xKJm4G_U@sN_Tm=`$xWJSEwKU98rZ&)1R^*$$1vA3oG#&*%SMxY_~oGP zP&PFJatFLM-Ps%84IV-+Ow)T{C7cqUAvauy4C z(FRz&?6$Rypj{xO!`y=*J5o4@U8Q-(y5(*=YoKeZ+-1YdljXxkA#B)zo=FeQH#?Le zycNUmEEHWO9a=X^pb#&cOq7-`7UA87#|S22)<7RUtZo|(zibX=w;K3qur9vy#`MNV z6UUcf9ZwEnKCCp+OoBnF@OdbvH)ANXO0o~Pi9l8=x3))}L<#vO0-~O4!~--Ket?d} zJaqsj<@CD1%S2cTW%rOP{Vto%0sGW~1RMa_j^)5nil0Yw- z0EE#bP+l4#P^%PQ+N*oxu1Zq05xZ!bXfYTg>9c{(Iw*lnjR^>kz%lAN^zFce7rppy zY8zA~3GD=A6d*hze&l4D_wA~+O!56)BZTe_rEu}Ezi<4!kG|W#amBZ5{&XS2@6R~H z{9o^y*BkH4$~yX9U&@CgbOzX1bn9xqF|zh$Dh0Y5y*E0e90*$!ObrHY3Ok0`2=O~r zCuke6KrP9KOf?V(YDsM<6pX2nVoN%M$LT^q#FmtaF?1^27F*IcNX~XRB(|hCFvdcc zc)$=S-)acdk$g4?_>jRqxpI6M3vHZk?0c^3=byamYDNf;uB{3NlKW5IhnOS3DNkMV z?tK8?kJ}pmvp%&&eTVOVjHP`q34hN1@!aK}H(K!vI`~gf|Gv+FNEQD5Yd<~yX7k_l h&G-K)@HZb3BABY{)U1?^%I#E6`MGoTtustd{~yM6srvu` literal 0 HcmV?d00001 diff --git a/SampleApps/UniversalApp/Assets/Square150x150Logo.scale-200.png b/SampleApps/UniversalApp/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..af49fec1a5484db1d52a7f9b5ec90a27c7030186 GIT binary patch literal 2937 zcma)84OCO-8BSud5)jwMLRVKgX(S?$n?Ld|vrsm<$CF7)&zTbyy1FE5bU`Q17MRv`9ue$;R(@8kR;#vJ*IM0>cJIAOte!d7oRgdH zd%ySjdB6L9=gX^A6)VzH7p2l@v~3zJAMw|DFy#^)F@@F*`mqUn=Il>l)8_+ab;nOW{%+iPx z+s{Eu|&pIs)Z7{La9~?xKfyl z#43?gjEL15d4WbOZo#SiP%>DB^+BcnJ=7dHEe;r#G=tuw|ka z%q@}##Uh7;tc%L_64m(kHtw74ty%BJMb)_1)#S0j`)F8_1jF7vScpsnH=0V19bO8y zR`0SjIdCUo&=>JwMQF8KHA<{ODHTiQh}0^@5QRmCA?gOH6_H3K^-_sNB^RrdNuK-R zOO*vOrKCVvDwgUck`kF(E7j{I#iiN;b*ZdCt4m@HPA`EuEqGGf4%!K<;(=I=&Vyrw z%TwcWtxa}8mCZ%Cyf&ActJ6_$ox5z6-D!0-dvnRx6t7y3d+h6QYpKWO;8OdnvERo7 zuEf>ih5`wqY)~o@OeVt-wM?Q!>QzdGRj!bz6fzYrfw$hZfAKzr2-M+D+R>}~oT574c;_3zquHcElqKIsryILt3g8n3jcMb+j?i?-L3FpZJ z2WRVBRdDPc+G5aaYg#5hpE+6nQ|(VSoxT3|biF;BUq#==-27Xi=gihDPYP$7?=9cP zYKE$jeQ|3~_L0VG-(F~2ZPyD0=k{J4Q~h(t__{-mz_w8{JDY9{`1ouzz!Vr5!ECdE z6U~O1k8c}24V7~zzXWTV-Pe4)y}wQJS&q%H5`Fo_f_JvIU489aCX$;P`u#!I-=^4ijC2{&9!O&h>mi?9oYD=GC#%)6{GzN6nQYw+Fal50!#x^asjBBR50i`+mho*ttoqV)ubM2KD9S~k7+FR4>{29?6 z{!l6kDdyTN0YJ9LgkPWeXm|gyi@zM3?0@{&pXT12w|78&W-q!RRF)&iLCEZVH<|fR zN0fr2^t8H(>L?>K#>^+jWROLral(Qy-xoBq1U7A&DV||wClb)Otd9?(gZ|8znMF}D zf<1haWz^s0qgecz;RFGt0C-B4g`jNGHsFU+;{<%t65v^sjk^h$lmWn#B0#_)9ij&d z-~lc`A)YYExi^7sBuPM^Y|wA2g*5?`K?#7tzELQYNxGo$UB$4J8RJp1k(8Jj+~hMT zlN~>M@KTTh^--8y3PK_NZ@AC!{PT=CziBzGd+wTJ^@icH!Bd}%)g8V)%K?|c&WTUk zy}qv1C%(fjRoZ4ozC3{O%@5?)XzH35zHns$pgU*Q?fj4v?fp1Qbm+j;3l;9jam9Da zXVcKjPlQ73x78QPu|Ffm6x?`~e3oD=gl=4kYK?={kD5j~QCXU)`HSdduNNENzA*2$ zOm3PzF!lN5e*06-f1Uot67wY#{o-S1!KZ7E=!~7ynnk9_iJR#kFoNbAOT#^2Gd17F zMmvU6>lndZQGd|ax9kUoXXO+$N?|j@6qpsF&_j7YXvwo_C{JpmLw5&#e6k>atv%es z5)7r*Wvv_JkUpT}M!_o!nVlEk1Zbl=a*2hQ*<|%*K1Glj^FcF`6kTzGQ3lz~2tCc@ z&x|tj;aH&1&9HwcJBcT`;{?a+pnej;M1HO(6Z{#J!cZA04hnFl;NXA+&`=7bjW_^o zfC40u3LMG?NdPtwGl>Tq6u}*QG)}-y;)lu-_>ee3kibW(69n0$0Zy!}9rQz%*v1iO zT9_H>99yIrSPYVy6^);rR}7Yo=J_T@hi+qhTZXnVWyf;JDYm5#eYLTxr*?kiNn!+Y zQ+LUkBafNJ#rH#C(?d5^;gw9o#%daEI{mA*LHPIHPU`#|H$hD zwm>0&+kahQ)E#%~k>&5@&#Vg82H?s%71=)(soi@174pi9--2{w{1$}Sz4zGn3Du&x bht0Iza^2ykEt4(epJ78uh5nDlX8(TxzDYwP literal 0 HcmV?d00001 diff --git a/SampleApps/UniversalApp/Assets/Square44x44Logo.scale-200.png b/SampleApps/UniversalApp/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..ce342a2ec8a61291ba76c54604aea7e9d20af11b GIT binary patch literal 1647 zcmaJ?eM}Q)7(e+G1Q(|`V9JhTI2>MkceK4;p;PR&$Pi?ejk3YQ_3o`S&|W_dsOZ8# zWPTt69g`t$ab`0cj-Y0yiBSOqmd)tG7G(}M5aP0_%&9TijB#&)I{zSE^4@#z^FF`l z`8{8`o%wlL(UI|y2!cdsuVamHH~H86F!*-15em4)NqUpCQM5?aoC_eCf@lV4wvF2a zjDQn1JBL69f&@2M3rvzJcfE!eZ8FZUBlFlC5RD)it33{mF9#B82AiyQE%w)`vlwa> zv{<1sm&kSKK$&%2jSFn7$t&P%%6Ue>R=EAnG8N7fqynWG8L3p!4801a;8{+nliO(qd(jNJ_?+9W3#hLIDLoT6~3fx9=`CC-D}-AMrpEO7HK zt3$GicGPc?GmDjy7K2P@La;eu4!$zWCZ`ym{Z$b zu-O6RM&K4JT|BIZB`E-gxqG%FzanI#+2FFmqHqXG7yxWB=w55RGOM)$xMb(>kSNR z2w=1AZi%z=AmG~yea~XaXJR!v7vLn(RUnELfiB1|6D84ICOS}^Zo2AdN}<&*h}G_u z{xZ!(%>tLT3J3<5XhWy-tg+6)0nmUUENLW8TWA{R6bgVd3X;anYFZ^IRis*_P-C-r z;i>%1^eL3UI2-{w8nuFFcs0e~7J{O2k^~Ce%+Ly4U?|=!0LH=t6()xi<^I-rs+9sF z*q{E-CxZbGPeu#a;XJwE;9S1?#R&uns>^0G3p`hEUF*v`M?@h%T%J%RChmD|EVydq zmHWh*_=S%emRC*mhxaVLzT@>Z2SX0u9v*DIJ@WC^kLVdlGV6LpK$KIrlJqc zpJ921)+3JJdTx|<`G&kXpKkjGJv=76R`yYIQ{#c-`%+`#V(7}Q;&@6U8!Td1`d;?N z_9mnI#?AA}4J!r)LN4!E-@H5eXauuB7TOawS>Y|{-P?NNx-lq+z1W-+y(;39P&&LP zL{N80?&=C*qKmdA^moMZRuPcD!B<*mq$ch=0Cnlitw#txRWhb3%TQvPqjkC`F69G4b! ze7z9MZ#+;_#l?H37UqUhDFb^l&s2{oM$3I0o^Q!yx;;V)QmCMo)Tb_ui|mit8MS?U zm##6$sZZ1$@|s%?l@>4Z<*Q}sRBSKMhb4I{e5LdEhsHIHTe8Bod5c>6QtT>$XgUBz z6MK`kO$=jmt@FqggOhJ5j~e@ygRbG;<{Vu)*+nn9aQeo0;$#j;|MS=S$&L?BeV25z xs3B`@=#`5TF{^6(A1rvdY@|-RtQ|iS5{tyX+wH?;n8E)G$kykv-D^wh{{!TZT%7;_ literal 0 HcmV?d00001 diff --git a/SampleApps/UniversalApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/SampleApps/UniversalApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000000000000000000000000000000000..f6c02ce97e0a802b85f6021e822c89f8bf57d5cd GIT binary patch literal 1255 zcmaJ>TWs4@7*5+{G#S+&C!qC#> zf>5N3P6jO*Cz>ug*(_DmW=)kea&m$gZ^+nyiF`;j%w@}y8)>p*SH}C`m?DXeieF2U zyQHecc_L%Gh!7GMt+hG06y;+|p4>m~}PjA}rKViGiEnn7G0ZO<>G|7q;2?NwGCM3s?eued6%hd$B+ z*kQJ{#~$S=DFE(%=E+UkmlEI*%3llUf~8Ja9YU1Vui0IbGBkW_gHB%Rd&!!ioX zs40O?i9I{};kle7GMvE7(rk`la=gTI)47=>%?q@^iL-nUo3}h4S}N-KHn8t5mVP8w z&bSErwp+37 zNJJ8?a|{r5Q3R0Z5s-LB1WHOwYC@7pCHWND#cL1cZ?{kJ368_*(UDWUDyb<}0y@o# zfMF016iMWPCb6obAxT$JlB6(2DrlXDTB&!0`!m??4F(qWMhjVZo?JXQmz`1*58Z=& zcDmB|S-E@j?BoFGix0flckqdS4jsPNzhfWyWIM98GxcLs89C(~dw%$_t;JjX-SD}E zfiGV;{8Q%8r}w9x>EEigW81>`kvnU@pK)4+xk9@+bNj9L!AAZ@SZ@q|)&BmY3+HZx zul~BeG4|}-;L%cHViQGQX?^zFfO0&#cHwel=d`lH9sJ-@Sl@n*(8J2>%Ac`IxyY?Q z{=GhWvC#gu-~Ia7*n{=+;qM?Ul_wy1+u7ho;=`>EwP^g~R@{unBds`!#@}tluZQpS zm)M~nYEifJWJGx?_6DcTy>#uh%>!H9=hb^(v`=m3F1{L>db=<5_tm+_&knAQ2EU$s Mu9UqpbNZeC0BbUo^Z)<= literal 0 HcmV?d00001 diff --git a/SampleApps/UniversalApp/Assets/StoreLogo.png b/SampleApps/UniversalApp/Assets/StoreLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..7385b56c0e4d3c6b0efe3324aa1194157d837826 GIT binary patch literal 1451 zcmaJ>eN5D57_Z|bH;{0+1#mbl)eTU3{h)Wf7EZV?;HD@XL@{B`Ui%(2aMxQ~xdXSv z5nzWi(LW)U2=Vc-cY@s7nPt{i0hc6!7xN4NNHI#EQl>YNBy8l4%x9gr_W-j zEZMQmmTIy(>;lblRfh`dIyTgc9W5d!VP$L4(kKrN1c5G~(O_#xG zAJCNTstD^5SeXFB+&$h=ToJP2H>xr$iqPs-#O*;4(!Fjw25-!gEb*)mU}=)J;Iu>w zxK(5XoD0wrPSKQ~rbL^Cw6O_03*l*}i=ydbu7adJ6y;%@tjFeXIXT+ms30pmbOP%Q zX}S;+LBh8Tea~TSkHzvX6$rYb)+n&{kSbIqh|c7hmlxmwSiq5iVhU#iEQ<>a18|O^Sln-8t&+t`*{qBWo5M?wFM(JuimAOb5!K#D}XbslM@#1ZVz_;!9U zpfEpLAOz=0g@bd6Xj_ILi-x^!M}73h^o@}hM$1jflTs|Yuj9AL@A3<-?MV4!^4q`e z)fO@A;{9K^?W?DbnesnPr6kK>$zaKo&;FhFd(GYFCIU^T+OIMb%Tqo+P%oq(IdX7S zf6+HLO?7o0m+p>~Tp5UrXWh!UH!wZ5kv!E`_w)PTpI(#Iw{AS`gH4^b(bm^ZCq^FZ zY9DD7bH}rq9mg88+KgA$Zp!iWncuU2n1AuIa@=sWvUR-s`Qb{R*kk(SPU^`$6BXz8 zn#7yaFOIK%qGxyi`dYtm#&qqox0$h=pNi#u=M8zUG@bpiZ=3sT=1}Trr}39cC)H|v zbL?W)=&s4zrh)7>L(|cc%$1#!zfL?HjpeP%T+x_a+jZ16b^iKOHxFEX$7d|8${H-* zIrOJ5w&i$>*D>AKaIoYg`;{L@jM((Kt?$N$5OnuPqVvq**Nm}(f0wwOF%iX_Pba;V z;m@wxX&NcV3?<1+u?A{y_DIj7#m3Af1rCE)o`D&Y3}0%7E;iX1yMDiS)sh0wKi!36 zL!Wmq?P^Ku&rK~HJd97KkLTRl>ScGFYZNlYytWnhmuu|)L&ND8_PmkayQb{HOY640 bno1(wj@u8DCVuFR|31B*4ek@pZJqxCDDe1x literal 0 HcmV?d00001 diff --git a/SampleApps/UniversalApp/Assets/Wide310x150Logo.scale-200.png b/SampleApps/UniversalApp/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..288995b397fdbef1fb7e85afd71445d5de1952c5 GIT binary patch literal 3204 zcmbVPeQXow8NYmBd90>}0NP?GhXW~VaeThm=a0tV#EwJMI!)6M3}|c4_Bl3=Kd>G0 z(GHx1wl<7(tP?FsOQkTilSo*iIvF%uArExJ73~P zSv1xEy!U(Wd4A9D`FQV@W3@F^qJ@PEF$@z`Z!*BbFsS(^?B zyiAzJ+q})bkgiQHWqEb*jJD-coHYr1^iocg)l!Qa{Xqs-l~6J}p-|##ZHYofskQ3$ zI0;xzXyhazBeXhIsg5A=%ufo@f)1yy&ScKS0;HF^!r_2UE^lpZEom(+@duma3awTv zCrCL-%D_SvYWIcdHkmI}#50(fkUi)Qgx!80ju>g1za^}ff>JI8Z@^-iCiaCgg@TgF z+vtE?Q9{VQUX&MW9SYYmGcxA14%N2@7FwBTD4N<(2{nWgV8$e3?-F=L^&FrtWn~(U_Q~~^uYiyeY6-KoTnfh9AWz@ zIKje0)u!_Lw)E}G!#kEfwKVdNt(UAf9*f>tEL_(=xco-T%jTi@7YlC3hs2ik%Le0H ztj}RTeCF(5mwvi3_56>-yB?l;J>-1%!9~=fs|QcNG3J~a@JCu`4SB460s0ZO+##4fFUSGLcj_ja^fL4&BKALfb#$6$O?>P@qx2Agl^x0i&ugt zsy5Pyu=()`7HRMG3IB7F1@`_ z+-!J%#i6e^U$e#+C%Q>_qVRzWRsG^W_n+@OcX@vzI&z;mzHNb!GQ?LWA(wtpqHqTM z1OFw_{Zn?fD)p)`c`kOgv{de=v@suGRqY{N^U7gI1VF3*F=obwaXI6ob5__Yn zVTguS!%(NI09J8x#AO_aW!9W7k*UvB;IWDFC3srwftr{kHj%g)fvnAm;&h_dnl~

MY- zf+K}sCe8qU6Ujs`3ua{U0Of$R_gVQBuUA za0v=mu#vIOqiiAZOr&h*$WyOw&k-xr$;G4Ixa!#TJNr>95(h>l%)PUy4p+^SgR(uR zta%k*?ny-+nAr8spEk1fo{J4i!b^Fia`N{_F6@zidA2ZTTrjl#^5Z-2KfB@Cu}l9s z(*|Z2jc?p~vn2f)3y9i*7zJV1L{$?|&q)4oaT;uXi6>1GkRXVTOzAz(RHEmr=eFIi z`}<>-Q?K0GN8!IYxeP1XKXO+jsJbp~o^);Bc;%b7Flpe7;1`Ny@3r7ZR;?R)aJt8C ziNlEC<@3f_lIV4TwV}&e;D!Ee5_|e#g0LUh=5vmYWYm7&2h*M>QPKvGh9-)wfMMW3 z8J9b%1k7dzPzO0_NGQy92BZ^FR6R~6;^6?lqO;-QUP4BY%cG%3vEhbm#>4vIhPBh3 z-+pZGjh$x%Hp{?=FHsMp0&wNPlj00us{&`1ZOZTqs8%4X&xH=UDr*xyBW(Zp&Em94 zf)ZSfn#yg0N)>!1kWdkqJ^S*z0FF5|fj&qcE#Na|%OY0$uO>!&hP+1ywfD_WXk@4J(?MBftK7>$Nvqh@tDuarN%PrTLQ2Uzysx>UV=V zk^RrDSvdQ?0;=hY67EgII-f4`t=+i*yS=Y~!XlqIy_4x&%+OdfbKOFPXS2X5%4R{N z$SQMX^AK6(fA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OpenStreetMap + OpenCycleMap + Landscape + Outdoors + Transport + Transport Dark + MapQuest Open + + + + + + diff --git a/SampleApps/UniversalApp/MainPage.xaml.cs b/SampleApps/UniversalApp/MainPage.xaml.cs new file mode 100644 index 00000000..195842fa --- /dev/null +++ b/SampleApps/UniversalApp/MainPage.xaml.cs @@ -0,0 +1,35 @@ +using MapControl; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; + +namespace UniversalApp +{ + public sealed partial class MainPage : Page + { + public MainPage() + { + //TileImageLoader.Cache = new MapControl.Caching.ImageFileCache(); + + this.InitializeComponent(); + } + + private void ImageOpacitySliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) + { + if (mapImage != null) + { + mapImage.Opacity = e.NewValue / 100; + } + } + + private void SeamarksChecked(object sender, RoutedEventArgs e) + { + map.TileLayers.Add(((TileLayerCollection)Resources["TileLayers"])["Seamarks"]); + } + + private void SeamarksUnchecked(object sender, RoutedEventArgs e) + { + map.TileLayers.Remove(((TileLayerCollection)Resources["TileLayers"])["Seamarks"]); + } + } +} diff --git a/SampleApps/UniversalApp/Package.appxmanifest b/SampleApps/UniversalApp/Package.appxmanifest new file mode 100644 index 00000000..141a3b7b --- /dev/null +++ b/SampleApps/UniversalApp/Package.appxmanifest @@ -0,0 +1,28 @@ + + + + + + UniversalApp + Clemens + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleApps/UniversalApp/Properties/AssemblyInfo.cs b/SampleApps/UniversalApp/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..743f5476 --- /dev/null +++ b/SampleApps/UniversalApp/Properties/AssemblyInfo.cs @@ -0,0 +1,14 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Windows Universal Sample Application")] +[assembly: AssemblyDescription("XAML Map Control Windows Universal Sample Application")] +[assembly: AssemblyProduct("XAML Map Control")] +[assembly: AssemblyCompany("Clemens Fischer")] +[assembly: AssemblyCopyright("© 2015 Clemens Fischer")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] +[assembly: AssemblyConfiguration("")] +[assembly: ComVisible(false)] diff --git a/SampleApps/UniversalApp/Properties/Default.rd.xml b/SampleApps/UniversalApp/Properties/Default.rd.xml new file mode 100644 index 00000000..80a960ce --- /dev/null +++ b/SampleApps/UniversalApp/Properties/Default.rd.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleApps/UniversalApp/UniversalApp.csproj b/SampleApps/UniversalApp/UniversalApp.csproj new file mode 100644 index 00000000..9be56786 --- /dev/null +++ b/SampleApps/UniversalApp/UniversalApp.csproj @@ -0,0 +1,167 @@ + + + + + Debug + x86 + {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1} + AppContainerExe + Properties + UniversalApp + UniversalApp + en-US + UAP + 10.0.10240.0 + 10.0.10240.0 + 14 + true + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + UniversalApp_TemporaryKey.pfx + + + true + bin\ARM\Debug\ + TRACE;DEBUG;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS + ;2008 + full + ARM + false + prompt + true + false + false + + + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + none + ARM + false + prompt + true + true + false + + + true + bin\x64\Debug\ + TRACE;DEBUG;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS + ;2008 + full + x64 + false + prompt + true + false + false + + + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + none + x64 + false + prompt + true + true + false + + + true + bin\x86\Debug\ + TRACE;DEBUG;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS + ;2008 + full + x86 + false + prompt + true + false + false + + + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + none + x86 + false + prompt + true + true + false + + + + + + + + ViewModel.cs + + + App.xaml + + + + MainPage.xaml + + + + + + Designer + + + + + + 10_535_330.jpg + + + + + + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + {f789647e-96f7-43e3-a895-fa3fe8d01260} + ImageFileCache.WinRT + + + {63cefdf7-5170-43b6-86f8-5c4a383a1615} + MapControl.WinRT + + + + 14.0 + + + + \ No newline at end of file diff --git a/SampleApps/UniversalApp/UniversalApp.csproj.user b/SampleApps/UniversalApp/UniversalApp.csproj.user new file mode 100644 index 00000000..b3dcca21 --- /dev/null +++ b/SampleApps/UniversalApp/UniversalApp.csproj.user @@ -0,0 +1,7 @@ + + + + 30F105C9-681E-420b-A277-7C086EAD8A4E + true + + \ No newline at end of file diff --git a/SampleApps/UniversalApp/UniversalApp_TemporaryKey.pfx b/SampleApps/UniversalApp/UniversalApp_TemporaryKey.pfx new file mode 100644 index 0000000000000000000000000000000000000000..66f065bca92b9143cf7decb3ee0d5f971e165ee1 GIT binary patch literal 2454 zcmZve2|N`2AIE2QXP4EkJG8Nm%3aOoij7BBkqW7ZLXJFm9JQ_-IfhW-@i4-xZ|WQd!}Sb8pni!L7pdJ^JZ|KnrSyFx=7WnS&vhh2?9vM&b2tb$%^k!uDdQPn<7=`WX4!$vwZhQ||0Bji;Ry{X-{ ztko_=Ra{fR)XBe#k_!X75c-XK;f1#r8!W2v*6&lgXrJ?#^-gCT zb!~~aFJ>FQOnOonD(oF|X=1E0l&{N*p5UZrE8}t^4o^7sw$816(bh`%Pv%L!LDo!l zp>A{W2Z&=-nk2CGSb2(vqqB~H$`PU3)$jmGt&)KwG65XKI&TR}(tp0%WX&wf{;NGh zF=wG~MC_tDD_p-NH8D~jkawN9^Cf?6mmJ<{&$owcncAvq{!b#i-n=gpm|~oH>w!^r zIg~UnP2t}{ZV04Mbv-OCbRsV&XmIyypQ7nyE`0J%)oXI&nEr7+>;BmQC5^@aw@&f0 z!PAvCYj9}Fms`56O)KF9?iz=H`x2ezsp4RTb{P3>MC%uLT_q#GKXA1)o@vk7tuFfI zY#Ppz$1p0--l}EGTOC;~9x*9@1)Y?^TimX12=QSDdCHti-wycF&6`U^xSG06>i%|g zMuLnveXi}~hKSPl*9%kE_?#gF^|QJ3XNC$=^ULLlASflkc zg}OjEQ|rs^In8aV*_TaXY=N zX0xPM>?Q3cx_A2f=fsclH_9kI`G8!<8V=nkzVK_ZWYhPgIxD{(j3T`KBlXMIZ(zBMa z_)pw5Y_ZrKfw>br?{s~({dw+uYH~+>RARho-OwlSDrEPc zoN4Pb2rC~liMg^b>E<*NGpC+*{|sGnuA`*yG4oLrUB&?u*Kkp|yuP1Y-`h^6m(nG3 z?A$}IE%}O4ANiVje!Vlf>^$E=@^F$CPFc(gkmD|>D1M?JVT%v0*^yW3uPM~K@oJh~ z{I#n{N#65%nf!EIWJihiWu40*i=D~3!w6Z^dxZbtJsaY@ZzhyjO=19^fEQ{`fHxoo97p%xi3jjIs_3Zi51dDtC#o4}sq=vIk1Q#`^hca8 zsvOY;Fkl3$_H*UmKMYt|2*Jvrn1UMl*XfVVL@g{`w1dw0%iz8Fas#>gAuSP z6N>>c82+s*58C}6Zx1t4xv*rAMp=bPKQ97q!U3=#l^^ECV^2a@AuhVxIrnoOUNA+J zL{)?L!m3nFl|57yD^#j~moW8*{MQ@=l=-zZhy$<)$OoV+;lUsv2)x8@*qwac&4|3v z%54?+ol`$fn0z25>Z4oB zC-qc1|Ex#9gn*9gPTrH5Pp;J`4NcsxoLfH3nh?o-{d5f5!d@S?i;>&Z7&Lx!>Bv=) z@M)dqj3BXD;_le1Zh!1wt6Dd;c-;2&cNep{S4pBQ+Uq+7CepOgo?}_-cdI{^B~vcB z++mwtQ~xrd5Tmu}4fVs3qD!BaC?A*l`vc&TBwB1y7}K= 5.0.0" + ], + "UAP,Version=v10.0": [] + } +} \ No newline at end of file diff --git a/SampleApps/WpfApplication/MainWindow.xaml b/SampleApps/WpfApplication/MainWindow.xaml index ef519122..a9228745 100644 --- a/SampleApps/WpfApplication/MainWindow.xaml +++ b/SampleApps/WpfApplication/MainWindow.xaml @@ -9,7 +9,7 @@ Stylus.IsPressAndHoldEnabled="False"> + + + - - - diff --git a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs index 57309aca..2b6a56b8 100644 --- a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.12")] -[assembly: AssemblyFileVersion("2.4.12")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)]