From 27a302a5b88f0419920e70e926f25416c97bb4f6 Mon Sep 17 00:00:00 2001 From: ClemensF Date: Thu, 22 Nov 2012 21:42:29 +0100 Subject: [PATCH] First commit of the new XAML Map Control that replaces WPF Map Control, and now supports all three XAML platforms, WPF, Silverlight and WinRT. --- Caching/FileDbCache/FileDbCache.cs | 6 +- Caching/FileDbCache/FileDbCache.csproj | 5 +- .../FileDbCache/Properties/AssemblyInfo.cs | 26 +- Caching/ImageFileCache/ImageFileCache.cs | 6 +- Caching/ImageFileCache/ImageFileCache.csproj | 5 +- .../ImageFileCache/Properties/AssemblyInfo.cs | 28 +- MapControl.sln | 178 +- MapControl/AnimationEx.Silverlight.cs | 21 + MapControl/AnimationEx.WinRT.cs | 49 + MapControl/GlyphRunText.cs | 23 +- MapControl/ImageTileSource.cs | 2 +- MapControl/Int32Rect.cs | 43 + MapControl/Location.cs | 70 +- MapControl/LocationAnimation.cs | 56 - MapControl/LocationCollection.cs | 27 +- MapControl/LocationCollectionConverter.cs | 28 + MapControl/LocationConverter.cs | 28 + MapControl/Map.Silverlight.WPF.cs | 64 + MapControl/Map.WinRT.cs | 68 + MapControl/Map.cs | 80 +- MapControl/MapBase.Silverlight.WinRT.cs | 49 + MapControl/MapBase.WPF.cs | 66 + MapControl/MapBase.cs | 607 +++--- MapControl/MapControl.Silverlight.csproj | 132 ++ MapControl/MapControl.Silverlight.csproj.user | 29 + ...apControl.csproj => MapControl.WPF.csproj} | 78 +- MapControl/MapElement.cs | 55 - MapControl/MapGraticule.Silverlight.WinRT.cs | 172 ++ MapControl/MapGraticule.WPF.cs | 74 + MapControl/MapGraticule.cs | 81 +- MapControl/MapInput.cs | 85 - MapControl/MapItem.WPF.cs | 45 + MapControl/MapItem.cs | 139 +- MapControl/MapItemsControl.WPF.cs | 58 + MapControl/MapItemsControl.cs | 238 +-- MapControl/MapOverlay.Silverlight.WinRT.cs | 128 ++ MapControl/MapOverlay.WPF.cs | 153 ++ MapControl/MapOverlay.cs | 158 +- MapControl/MapPanel.cs | 236 ++- MapControl/MapPolygon.cs | 27 +- MapControl/MapPolyline.Silverlight.cs | 25 + MapControl/MapPolyline.WPF.cs | 18 + MapControl/MapPolyline.WinRT.cs | 16 + MapControl/MapPolyline.cs | 241 +-- MapControl/MapScale.cs | 62 +- MapControl/MapTransform.cs | 27 +- MapControl/MatrixEx.cs | 67 + MapControl/MercatorTransform.cs | 41 +- MapControl/Properties/AssemblyInfo.cs | 39 +- MapControl/Pushpin.WPF.cs | 17 + MapControl/Pushpin.cs | 48 +- MapControl/Themes/Generic.xaml | 54 +- MapControl/Tile.Silverlight.WinRT.cs | 71 + MapControl/Tile.WPF.cs | 62 + MapControl/Tile.cs | 56 +- MapControl/TileContainer.Silverlight.WinRT.cs | 56 + MapControl/TileContainer.WPF.cs | 29 + MapControl/TileContainer.cs | 113 +- .../TileImageLoader.Silverlight.WinRT.cs | 40 + ...eImageLoader.cs => TileImageLoader.WPF.cs} | 62 +- MapControl/TileLayer.Silverlight.WinRT.cs | 59 + MapControl/TileLayer.WPF.cs | 43 + MapControl/TileLayer.cs | 99 +- MapControl/TileLayerCollection.cs | 7 +- MapControl/TileSource.cs | 46 +- MapControl/TileSourceConverter.cs | 28 + MapControl/TransformEx.WinRT.cs | 17 + MapControl/WinRT/MapControl.WinRT.csproj | 229 +++ MapControl/WinRT/Properties/AssemblyInfo.cs | 14 + MapControl/WinRT/ReadMe.txt | 4 + MapControl/WinRT/Themes/Generic.xaml | 64 + .../Properties/AssemblyInfo.cs | 55 - .../ClientBin/SilverlightApplication.xap | Bin 0 -> 33189 bytes .../Properties/AssemblyInfo.cs | 14 + .../SilverlightApplication.Web/Silverlight.js | 2 + .../SilverlightApplication.Web.csproj | 111 + .../SilverlightApplication.Web.csproj.user | 30 + .../SilverlightApplicationTestPage.aspx | 74 + .../SilverlightApplicationTestPage.html | 73 + .../Web.Debug.config | 30 + .../Web.Release.config | 31 + .../SilverlightApplication.Web/Web.config | 14 + SampleApps/SilverlightApplication/App.xaml | 6 + SampleApps/SilverlightApplication/App.xaml.cs | 68 + .../SilverlightApplication/MainPage.xaml | 152 ++ .../SilverlightApplication/MainPage.xaml.cs | 153 ++ .../Properties/AppManifest.xml | 5 + .../Properties/AssemblyInfo.cs | 14 + .../Properties/InBrowserSettings.xml | 5 + .../Properties/OutOfBrowserSettings.xml | 10 + .../SilverlightApplication/SampleItems.cs | 51 + .../SilverlightApplication.csproj | 125 ++ .../SilverlightApplication.csproj.user | 28 + SampleApps/StoreApplication/App.xaml | 20 + SampleApps/StoreApplication/App.xaml.cs | 90 + SampleApps/StoreApplication/Assets/Logo.png | Bin 0 -> 801 bytes .../StoreApplication/Assets/SmallLogo.png | Bin 0 -> 329 bytes .../StoreApplication/Assets/SplashScreen.png | Bin 0 -> 2146 bytes .../StoreApplication/Assets/StoreLogo.png | Bin 0 -> 429 bytes .../Common/StandardStyles.xaml | 1829 +++++++++++++++++ SampleApps/StoreApplication/MainPage.xaml | 154 ++ SampleApps/StoreApplication/MainPage.xaml.cs | 156 ++ .../StoreApplication/Package.appxmanifest | 42 + .../Properties/AssemblyInfo.cs | 14 + SampleApps/StoreApplication/SampleItems.cs | 51 + .../StoreApplication/StoreApplication.csproj | 154 ++ .../StoreApplication.csproj.user | 6 + SampleApps/SurfaceApplication/App.config | 2 +- SampleApps/SurfaceApplication/MainWindow.xaml | 6 +- .../Properties/AssemblyInfo.cs | 60 +- .../Properties/Resources.Designer.cs | 2 +- .../Properties/Settings.Designer.cs | 4 +- .../SurfaceApplication.csproj | 14 +- .../App.config | 13 +- .../App.xaml | 2 +- .../App.xaml.cs | 2 +- .../LocationToVisibilityConverter.cs} | 17 +- .../MainWindow.xaml | 82 +- .../MainWindow.xaml.cs | 33 +- .../WpfApplication/Properties/AssemblyInfo.cs | 16 + .../Properties/Settings.Designer.cs | 6 +- .../Properties/Settings.settings | 0 .../SampleItems.cs | 12 +- .../WpfApplication.csproj} | 16 +- 124 files changed, 6938 insertions(+), 2093 deletions(-) create mode 100644 MapControl/AnimationEx.Silverlight.cs create mode 100644 MapControl/AnimationEx.WinRT.cs create mode 100644 MapControl/Int32Rect.cs delete mode 100644 MapControl/LocationAnimation.cs create mode 100644 MapControl/LocationCollectionConverter.cs create mode 100644 MapControl/LocationConverter.cs create mode 100644 MapControl/Map.Silverlight.WPF.cs create mode 100644 MapControl/Map.WinRT.cs create mode 100644 MapControl/MapBase.Silverlight.WinRT.cs create mode 100644 MapControl/MapBase.WPF.cs create mode 100644 MapControl/MapControl.Silverlight.csproj create mode 100644 MapControl/MapControl.Silverlight.csproj.user rename MapControl/{MapControl.csproj => MapControl.WPF.csproj} (65%) delete mode 100644 MapControl/MapElement.cs create mode 100644 MapControl/MapGraticule.Silverlight.WinRT.cs create mode 100644 MapControl/MapGraticule.WPF.cs delete mode 100644 MapControl/MapInput.cs create mode 100644 MapControl/MapItem.WPF.cs create mode 100644 MapControl/MapItemsControl.WPF.cs create mode 100644 MapControl/MapOverlay.Silverlight.WinRT.cs create mode 100644 MapControl/MapOverlay.WPF.cs create mode 100644 MapControl/MapPolyline.Silverlight.cs create mode 100644 MapControl/MapPolyline.WPF.cs create mode 100644 MapControl/MapPolyline.WinRT.cs create mode 100644 MapControl/MatrixEx.cs create mode 100644 MapControl/Pushpin.WPF.cs create mode 100644 MapControl/Tile.Silverlight.WinRT.cs create mode 100644 MapControl/Tile.WPF.cs create mode 100644 MapControl/TileContainer.Silverlight.WinRT.cs create mode 100644 MapControl/TileContainer.WPF.cs create mode 100644 MapControl/TileImageLoader.Silverlight.WinRT.cs rename MapControl/{TileImageLoader.cs => TileImageLoader.WPF.cs} (78%) create mode 100644 MapControl/TileLayer.Silverlight.WinRT.cs create mode 100644 MapControl/TileLayer.WPF.cs create mode 100644 MapControl/TileSourceConverter.cs create mode 100644 MapControl/TransformEx.WinRT.cs create mode 100644 MapControl/WinRT/MapControl.WinRT.csproj create mode 100644 MapControl/WinRT/Properties/AssemblyInfo.cs create mode 100644 MapControl/WinRT/ReadMe.txt create mode 100644 MapControl/WinRT/Themes/Generic.xaml delete mode 100644 SampleApps/SampleApplication/Properties/AssemblyInfo.cs create mode 100644 SampleApps/SilverlightApplication.Web/ClientBin/SilverlightApplication.xap create mode 100644 SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs create mode 100644 SampleApps/SilverlightApplication.Web/Silverlight.js create mode 100644 SampleApps/SilverlightApplication.Web/SilverlightApplication.Web.csproj create mode 100644 SampleApps/SilverlightApplication.Web/SilverlightApplication.Web.csproj.user create mode 100644 SampleApps/SilverlightApplication.Web/SilverlightApplicationTestPage.aspx create mode 100644 SampleApps/SilverlightApplication.Web/SilverlightApplicationTestPage.html create mode 100644 SampleApps/SilverlightApplication.Web/Web.Debug.config create mode 100644 SampleApps/SilverlightApplication.Web/Web.Release.config create mode 100644 SampleApps/SilverlightApplication.Web/Web.config create mode 100644 SampleApps/SilverlightApplication/App.xaml create mode 100644 SampleApps/SilverlightApplication/App.xaml.cs create mode 100644 SampleApps/SilverlightApplication/MainPage.xaml create mode 100644 SampleApps/SilverlightApplication/MainPage.xaml.cs create mode 100644 SampleApps/SilverlightApplication/Properties/AppManifest.xml create mode 100644 SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs create mode 100644 SampleApps/SilverlightApplication/Properties/InBrowserSettings.xml create mode 100644 SampleApps/SilverlightApplication/Properties/OutOfBrowserSettings.xml create mode 100644 SampleApps/SilverlightApplication/SampleItems.cs create mode 100644 SampleApps/SilverlightApplication/SilverlightApplication.csproj create mode 100644 SampleApps/SilverlightApplication/SilverlightApplication.csproj.user create mode 100644 SampleApps/StoreApplication/App.xaml create mode 100644 SampleApps/StoreApplication/App.xaml.cs create mode 100644 SampleApps/StoreApplication/Assets/Logo.png create mode 100644 SampleApps/StoreApplication/Assets/SmallLogo.png create mode 100644 SampleApps/StoreApplication/Assets/SplashScreen.png create mode 100644 SampleApps/StoreApplication/Assets/StoreLogo.png create mode 100644 SampleApps/StoreApplication/Common/StandardStyles.xaml create mode 100644 SampleApps/StoreApplication/MainPage.xaml create mode 100644 SampleApps/StoreApplication/MainPage.xaml.cs create mode 100644 SampleApps/StoreApplication/Package.appxmanifest create mode 100644 SampleApps/StoreApplication/Properties/AssemblyInfo.cs create mode 100644 SampleApps/StoreApplication/SampleItems.cs create mode 100644 SampleApps/StoreApplication/StoreApplication.csproj create mode 100644 SampleApps/StoreApplication/StoreApplication.csproj.user rename SampleApps/{SampleApplication => WpfApplication}/App.config (72%) rename SampleApps/{SampleApplication => WpfApplication}/App.xaml (84%) rename SampleApps/{SampleApplication => WpfApplication}/App.xaml.cs (75%) rename SampleApps/{SampleApplication/ViewportPositionToVisibilityConverter.cs => WpfApplication/LocationToVisibilityConverter.cs} (62%) rename SampleApps/{SampleApplication => WpfApplication}/MainWindow.xaml (76%) rename SampleApps/{SampleApplication => WpfApplication}/MainWindow.xaml.cs (87%) create mode 100644 SampleApps/WpfApplication/Properties/AssemblyInfo.cs rename SampleApps/{SampleApplication => WpfApplication}/Properties/Settings.Designer.cs (92%) rename SampleApps/{SampleApplication => WpfApplication}/Properties/Settings.settings (100%) rename SampleApps/{SampleApplication => WpfApplication}/SampleItems.cs (79%) rename SampleApps/{SampleApplication/SampleApplication.csproj => WpfApplication/WpfApplication.csproj} (90%) diff --git a/Caching/FileDbCache/FileDbCache.cs b/Caching/FileDbCache/FileDbCache.cs index dfa699bd..e7f1d87d 100644 --- a/Caching/FileDbCache/FileDbCache.cs +++ b/Caching/FileDbCache/FileDbCache.cs @@ -1,4 +1,8 @@ -using System; +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Diagnostics; diff --git a/Caching/FileDbCache/FileDbCache.csproj b/Caching/FileDbCache/FileDbCache.csproj index 8889f87b..30c9400b 100644 --- a/Caching/FileDbCache/FileDbCache.csproj +++ b/Caching/FileDbCache/FileDbCache.csproj @@ -10,8 +10,9 @@ Properties Caching FileDbCache - v4.0 + v4.5 512 + true @@ -21,6 +22,7 @@ DEBUG;TRACE prompt 4 + false none @@ -29,6 +31,7 @@ TRACE prompt 4 + false diff --git a/Caching/FileDbCache/Properties/AssemblyInfo.cs b/Caching/FileDbCache/Properties/AssemblyInfo.cs index bca33da7..b7d2c29b 100644 --- a/Caching/FileDbCache/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache/Properties/AssemblyInfo.cs @@ -1,36 +1,14 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. [assembly: AssemblyTitle("FileDbCache")] [assembly: AssemblyDescription("ObjectCache implementation based on EzTools FileDb")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Clemens Fischer")] -[assembly: AssemblyProduct("FileDbCache")] +[assembly: AssemblyProduct("XAML Map Control")] [assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c1fc4f52-e47c-4f62-9807-7e096db69851")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache/ImageFileCache.cs b/Caching/ImageFileCache/ImageFileCache.cs index 330c6d50..f69507c0 100644 --- a/Caching/ImageFileCache/ImageFileCache.cs +++ b/Caching/ImageFileCache/ImageFileCache.cs @@ -1,4 +1,8 @@ -using System; +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Diagnostics; diff --git a/Caching/ImageFileCache/ImageFileCache.csproj b/Caching/ImageFileCache/ImageFileCache.csproj index c2717585..d8233864 100644 --- a/Caching/ImageFileCache/ImageFileCache.csproj +++ b/Caching/ImageFileCache/ImageFileCache.csproj @@ -10,8 +10,9 @@ Properties Caching ImageFileCache - v4.0 + v4.5 512 + true @@ -21,6 +22,7 @@ DEBUG;TRACE prompt 4 + false none @@ -29,6 +31,7 @@ TRACE prompt 4 + false diff --git a/Caching/ImageFileCache/Properties/AssemblyInfo.cs b/Caching/ImageFileCache/Properties/AssemblyInfo.cs index ef77d2c5..95c153c3 100644 --- a/Caching/ImageFileCache/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache/Properties/AssemblyInfo.cs @@ -1,36 +1,14 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. [assembly: AssemblyTitle("ImageFileCache")] [assembly: AssemblyDescription("ObjectCache implementation based on local image files")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ImageFileCache")] +[assembly: AssemblyCompany("Clemens Fischer")] +[assembly: AssemblyProduct("XAML Map Control")] [assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0483659a-9743-41a2-9505-9c1a4d9ecc06")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] diff --git a/MapControl.sln b/MapControl.sln index a612b95a..800e97df 100644 --- a/MapControl.sln +++ b/MapControl.sln @@ -1,76 +1,202 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapControl", "MapControl\MapControl.csproj", "{06481252-2310-414A-B9FC-D5739FDF6BD3}" -EndProject +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileDbCache", "Caching\FileDbCache\FileDbCache.csproj", "{EF44F661-B98A-4676-927F-85D138F82300}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApplication", "SampleApps\SampleApplication\SampleApplication.csproj", "{CCBCDAE5-E68F-43A8-930A-0749E476D29D}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SurfaceApplication", "SampleApps\SurfaceApplication\SurfaceApplication.csproj", "{6285FB9D-B7EA-469A-B464-224077967167}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageFileCache", "Caching\ImageFileCache\ImageFileCache.csproj", "{86470440-FEE2-4120-AF5A-3762FB9C536F}" 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", "{CCBCDAE5-E68F-43A8-930A-0749E476D29D}" +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}") = "MapControl.Silverlight", "MapControl\MapControl.Silverlight.csproj", "{EB133B78-DEFF-416A-8F0C-89E54D766576}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StoreApplication", "SampleApps\StoreApplication\StoreApplication.csproj", "{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapControl.WinRT", "MapControl\WinRT\MapControl.WinRT.csproj", "{63CEFDF7-5170-43B6-86F8-5C4A383A1615}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM Release|Mixed Platforms = Release|Mixed Platforms + Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {06481252-2310-414A-B9FC-D5739FDF6BD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {06481252-2310-414A-B9FC-D5739FDF6BD3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {06481252-2310-414A-B9FC-D5739FDF6BD3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {06481252-2310-414A-B9FC-D5739FDF6BD3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {06481252-2310-414A-B9FC-D5739FDF6BD3}.Debug|x86.ActiveCfg = Debug|Any CPU - {06481252-2310-414A-B9FC-D5739FDF6BD3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {06481252-2310-414A-B9FC-D5739FDF6BD3}.Release|Any CPU.Build.0 = Release|Any CPU - {06481252-2310-414A-B9FC-D5739FDF6BD3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {06481252-2310-414A-B9FC-D5739FDF6BD3}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {06481252-2310-414A-B9FC-D5739FDF6BD3}.Release|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Debug|Any CPU {EF44F661-B98A-4676-927F-85D138F82300}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Debug|x64.ActiveCfg = Debug|Any CPU {EF44F661-B98A-4676-927F-85D138F82300}.Debug|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Release|Any CPU {EF44F661-B98A-4676-927F-85D138F82300}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {EF44F661-B98A-4676-927F-85D138F82300}.Release|x64.ActiveCfg = Release|Any CPU {EF44F661-B98A-4676-927F-85D138F82300}.Release|x86.ActiveCfg = Release|Any CPU - {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|Any CPU.ActiveCfg = Debug|x86 - {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|x86.ActiveCfg = Debug|x86 - {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|x86.Build.0 = Debug|x86 - {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|Any CPU.ActiveCfg = Release|x86 - {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|Mixed Platforms.Build.0 = Release|x86 - {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|x86.ActiveCfg = Release|x86 - {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|x86.Build.0 = Release|x86 {6285FB9D-B7EA-469A-B464-224077967167}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6285FB9D-B7EA-469A-B464-224077967167}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6285FB9D-B7EA-469A-B464-224077967167}.Debug|ARM.ActiveCfg = Debug|Any CPU {6285FB9D-B7EA-469A-B464-224077967167}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {6285FB9D-B7EA-469A-B464-224077967167}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {6285FB9D-B7EA-469A-B464-224077967167}.Debug|x64.ActiveCfg = Debug|Any CPU {6285FB9D-B7EA-469A-B464-224077967167}.Debug|x86.ActiveCfg = Debug|Any CPU {6285FB9D-B7EA-469A-B464-224077967167}.Release|Any CPU.ActiveCfg = Release|Any CPU {6285FB9D-B7EA-469A-B464-224077967167}.Release|Any CPU.Build.0 = Release|Any CPU + {6285FB9D-B7EA-469A-B464-224077967167}.Release|ARM.ActiveCfg = Release|Any CPU {6285FB9D-B7EA-469A-B464-224077967167}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {6285FB9D-B7EA-469A-B464-224077967167}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {6285FB9D-B7EA-469A-B464-224077967167}.Release|x64.ActiveCfg = Release|Any CPU {6285FB9D-B7EA-469A-B464-224077967167}.Release|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Debug|Any CPU {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x64.ActiveCfg = Debug|Any CPU {86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Release|Any CPU {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x64.ActiveCfg = Release|Any CPU {86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x64.ActiveCfg = Debug|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x64.ActiveCfg = Release|Any CPU + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x64.ActiveCfg = Debug|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x64.ActiveCfg = Release|Any CPU + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x86.ActiveCfg = Release|Any CPU + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|Any CPU.ActiveCfg = Debug|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|ARM.ActiveCfg = Debug|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|x64.ActiveCfg = Debug|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|x86.ActiveCfg = Debug|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Debug|x86.Build.0 = Debug|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|Any CPU.ActiveCfg = Release|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|ARM.ActiveCfg = Release|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|Mixed Platforms.Build.0 = Release|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|x64.ActiveCfg = Release|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|x86.ActiveCfg = Release|x86 + {CCBCDAE5-E68F-43A8-930A-0749E476D29D}.Release|x86.Build.0 = Release|x86 + {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|Mixed Platforms.ActiveCfg = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|x64.ActiveCfg = Debug|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Debug|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|x64.ActiveCfg = Release|Any CPU + {226F3575-B683-446D-A2F0-181291DC8787}.Release|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x64.ActiveCfg = Debug|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x86.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x64.ActiveCfg = Release|Any CPU + {EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x86.ActiveCfg = Release|Any CPU + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|ARM.ActiveCfg = Debug|ARM + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|ARM.Build.0 = Debug|ARM + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|ARM.Deploy.0 = Debug|ARM + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Mixed Platforms.Deploy.0 = Debug|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|x64.ActiveCfg = Debug|x64 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|x64.Build.0 = Debug|x64 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|x64.Deploy.0 = Debug|x64 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|x86.ActiveCfg = Debug|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|x86.Build.0 = Debug|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|x86.Deploy.0 = Debug|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|Any CPU.Build.0 = Release|Any CPU + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|Any CPU.Deploy.0 = Release|Any CPU + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|ARM.ActiveCfg = Release|ARM + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|ARM.Build.0 = Release|ARM + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|ARM.Deploy.0 = Release|ARM + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|Mixed Platforms.Build.0 = Release|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|Mixed Platforms.Deploy.0 = Release|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|x64.ActiveCfg = Release|x64 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|x64.Build.0 = Release|x64 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|x64.Deploy.0 = Release|x64 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|x86.ActiveCfg = Release|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|x86.Build.0 = Release|x86 + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|x86.Deploy.0 = Release|x86 + {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|ARM + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|ARM.Build.0 = Debug|ARM + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x64.ActiveCfg = Debug|x64 + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x64.Build.0 = Debug|x64 + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x86.ActiveCfg = Debug|x86 + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x86.Build.0 = Debug|x86 + {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|ARM + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|ARM.Build.0 = Release|ARM + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|Mixed Platforms.Build.0 = Release|x86 + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x64.ActiveCfg = Release|x64 + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x64.Build.0 = Release|x64 + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x86.ActiveCfg = Release|x86 + {63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/MapControl/AnimationEx.Silverlight.cs b/MapControl/AnimationEx.Silverlight.cs new file mode 100644 index 00000000..98e5ea5c --- /dev/null +++ b/MapControl/AnimationEx.Silverlight.cs @@ -0,0 +1,21 @@ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +using System.Windows; +using System.Windows.Media.Animation; + +namespace MapControl +{ + public static class AnimationEx + { + public static void BeginAnimation(this DependencyObject obj, DependencyProperty property, Timeline animation) + { + Storyboard.SetTargetProperty(animation, new PropertyPath(property)); + Storyboard.SetTarget(animation, obj); + var storyboard = new Storyboard(); + storyboard.Children.Add(animation); + storyboard.Begin(); + } + } +} diff --git a/MapControl/AnimationEx.WinRT.cs b/MapControl/AnimationEx.WinRT.cs new file mode 100644 index 00000000..0b8bf532 --- /dev/null +++ b/MapControl/AnimationEx.WinRT.cs @@ -0,0 +1,49 @@ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +using Windows.UI.Xaml; +using Windows.UI.Xaml.Media.Animation; + +namespace MapControl +{ + public static class AnimationEx + { + public static void BeginAnimation(this DependencyObject obj, DependencyProperty property, DoubleAnimation animation) + { + animation.EnableDependentAnimation = true; + + if (property == UIElement.OpacityProperty) + { + BeginAnimation(obj, "Opacity", animation); + } + else if (property == MapBase.ZoomLevelProperty) + { + BeginAnimation(obj, "ZoomLevel", animation); + } + else if (property == MapBase.HeadingProperty) + { + BeginAnimation(obj, "Heading", animation); + } + } + + public static void BeginAnimation(this DependencyObject obj, DependencyProperty property, PointAnimation animation) + { + animation.EnableDependentAnimation = true; + + if (property == MapBase.CenterPointProperty) + { + BeginAnimation(obj, "CenterPoint", animation); + } + } + + private static void BeginAnimation(DependencyObject obj, string property, Timeline animation) + { + Storyboard.SetTargetProperty(animation, property); + Storyboard.SetTarget(animation, obj); + var storyboard = new Storyboard(); + storyboard.Children.Add(animation); + storyboard.Begin(); + } + } +} diff --git a/MapControl/GlyphRunText.cs b/MapControl/GlyphRunText.cs index 0822dc43..9d670bb7 100644 --- a/MapControl/GlyphRunText.cs +++ b/MapControl/GlyphRunText.cs @@ -1,4 +1,4 @@ -// WPF MapControl - http://wpfmapcontrol.codeplex.com/ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ // Copyright © 2012 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) @@ -22,12 +22,12 @@ namespace MapControl throw new ArgumentException(string.Format("{0}: no GlyphTypeface found", typeface.FontFamily)); } - ushort[] glyphIndices = new ushort[text.Length]; - double[] advanceWidths = new double[text.Length]; + var glyphIndices = new ushort[text.Length]; + var advanceWidths = new double[text.Length]; for (int i = 0; i < text.Length; i++) { - ushort glyphIndex = glyphTypeface.CharacterToGlyphMap[text[i]]; + var glyphIndex = glyphTypeface.CharacterToGlyphMap[text[i]]; glyphIndices[i] = glyphIndex; advanceWidths[i] = glyphTypeface.AdvanceWidths[glyphIndex] * emSize; } @@ -45,21 +45,20 @@ namespace MapControl throw new ArgumentException(string.Format("{0}: no GlyphTypeface found", typeface.FontFamily)); } - ushort[] glyphIndices = new ushort[text.Length]; - double[] advanceWidths = new double[text.Length]; + var glyphIndices = new ushort[text.Length]; + var advanceWidths = new double[text.Length]; for (int i = 0; i < text.Length; i++) { - ushort glyphIndex = glyphTypeface.CharacterToGlyphMap[text[i]]; + var glyphIndex = glyphTypeface.CharacterToGlyphMap[text[i]]; glyphIndices[i] = glyphIndex; advanceWidths[i] = glyphTypeface.AdvanceWidths[glyphIndex] * emSize; } - GlyphRun glyphRun = new GlyphRun(glyphTypeface, 0, false, emSize, glyphIndices, new Point(), advanceWidths, - null, null, null, null, null, null); - - Rect bbox = glyphRun.ComputeInkBoundingBox(); - Point baselineOrigin = new Point(centerOffset.X - bbox.X - bbox.Width / 2d, centerOffset.Y - bbox.Y - bbox.Height / 2d); + var glyphRun = new GlyphRun(glyphTypeface, 0, false, emSize, glyphIndices, new Point(), advanceWidths, + null, null, null, null, null, null); + var bbox = glyphRun.ComputeInkBoundingBox(); + var baselineOrigin = new Point(centerOffset.X - bbox.X - bbox.Width / 2d, centerOffset.Y - bbox.Y - bbox.Height / 2d); return new GlyphRun(glyphTypeface, 0, false, emSize, glyphIndices, baselineOrigin, advanceWidths, null, null, null, null, null, null); diff --git a/MapControl/ImageTileSource.cs b/MapControl/ImageTileSource.cs index a61cf1d2..82a575f9 100644 --- a/MapControl/ImageTileSource.cs +++ b/MapControl/ImageTileSource.cs @@ -1,4 +1,4 @@ -// WPF MapControl - http://wpfmapcontrol.codeplex.com/ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ // Copyright © 2012 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) diff --git a/MapControl/Int32Rect.cs b/MapControl/Int32Rect.cs new file mode 100644 index 00000000..370085a3 --- /dev/null +++ b/MapControl/Int32Rect.cs @@ -0,0 +1,43 @@ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +namespace MapControl +{ + public struct Int32Rect + { + public Int32Rect(int x, int y, int width, int height) + : this() + { + X = x; + Y = y; + Width = width; + Height = height; + } + + public int X { get; set; } + public int Y { get; set; } + public int Width { get; set; } + public int Height { get; set; } + + public override int GetHashCode() + { + return X ^ Y ^ Width ^ Height; + } + + public override bool Equals(object obj) + { + return obj is Int32Rect && (Int32Rect)obj == this; + } + + public static bool operator ==(Int32Rect rect1, Int32Rect rect2) + { + return rect1.X == rect2.X && rect1.Y == rect2.Y && rect1.Width == rect2.Width && rect1.Height == rect2.Height; + } + + public static bool operator !=(Int32Rect rect1, Int32Rect rect2) + { + return !(rect1 == rect2); + } + } +} diff --git a/MapControl/Location.cs b/MapControl/Location.cs index 79a86956..f5f45d74 100644 --- a/MapControl/Location.cs +++ b/MapControl/Location.cs @@ -1,37 +1,39 @@ -// WPF MapControl - http://wpfmapcontrol.codeplex.com/ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ // Copyright © 2012 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) using System; -using System.ComponentModel; using System.Globalization; -using System.Windows; namespace MapControl { /// /// A geographic location given as latitude and longitude. /// - [TypeConverter(typeof(LocationConverter))] - public class Location + public partial class Location : IEquatable { private double latitude; private double longitude; + internal double Y; public Location() { } - public Location(double latitude, double longitude) + public Location(double lat, double lon) { - Latitude = latitude; - Longitude = longitude; + Latitude = lat; + Longitude = lon; } public double Latitude { get { return latitude; } - set { latitude = Math.Min(Math.Max(value, -90d), 90d); } + set + { + latitude = Math.Min(Math.Max(value, -90d), 90d); + Y = double.NaN; + } } public double Longitude @@ -40,36 +42,42 @@ namespace MapControl set { longitude = value; } } - public override string ToString() + public bool Equals(Location other) { - return string.Format(CultureInfo.InvariantCulture, "{0:0.00000},{1:0.00000}", latitude, longitude); + return other != null && other.latitude == latitude && other.longitude == longitude; } - public static Location Parse(string source) + public override bool Equals(object obj) { - Point p = Point.Parse(source); - return new Location(p.X, p.Y); + return Equals(obj as Location); + } + + public override int GetHashCode() + { + return latitude.GetHashCode() ^ longitude.GetHashCode(); + } + + public override string ToString() + { + return string.Format(CultureInfo.InvariantCulture, "{0:F5},{1:F5}", latitude, longitude); + } + + public static Location Parse(string s) + { + var tokens = s.Split(new char[] { ',' }); + if (tokens.Length != 2) + { + throw new FormatException("Location string must be a comma-separated pair of double values"); + } + + return new Location( + double.Parse(tokens[0], NumberStyles.Float, CultureInfo.InvariantCulture), + double.Parse(tokens[1], NumberStyles.Float, CultureInfo.InvariantCulture)); } public static double NormalizeLongitude(double longitude) { - return ((longitude + 180d) % 360d + 360d) % 360d - 180d; - } - } - - /// - /// Converts from string to Location. - /// - public class LocationConverter : TypeConverter - { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - return sourceType == typeof(string); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - return Location.Parse((string)value); + return (longitude >= -180d && longitude <= 180d) ? longitude : ((longitude + 180d) % 360d + 360d) % 360d - 180d; } } } diff --git a/MapControl/LocationAnimation.cs b/MapControl/LocationAnimation.cs deleted file mode 100644 index 0fd49e9a..00000000 --- a/MapControl/LocationAnimation.cs +++ /dev/null @@ -1,56 +0,0 @@ -// WPF MapControl - http://wpfmapcontrol.codeplex.com/ -// Copyright © 2012 Clemens Fischer -// Licensed under the Microsoft Public License (Ms-PL) - -using System; -using System.Windows; -using System.Windows.Media.Animation; - -namespace MapControl -{ - /// - /// Animates the value of a Location property between two values. - /// - public class LocationAnimation : AnimationTimeline - { - public Location From { get; set; } - public Location To { get; set; } - public IEasingFunction EasingFunction { get; set; } - - public override Type TargetPropertyType - { - get { return typeof(Location); } - } - - protected override Freezable CreateInstanceCore() - { - return new LocationAnimation - { - From = From, - To = To, - EasingFunction = EasingFunction - }; - } - - public override object GetCurrentValue(object defaultOriginValue, object defaultDestinationValue, AnimationClock animationClock) - { - if (!animationClock.CurrentProgress.HasValue) - { - return defaultOriginValue; - } - - double progress = animationClock.CurrentProgress.Value; - - if (EasingFunction != null) - { - progress = EasingFunction.Ease(progress); - } - - double deltaLongitude = progress * Location.NormalizeLongitude(To.Longitude - From.Longitude); - - return new Location( - (1d - progress) * From.Latitude + progress * To.Latitude, - Location.NormalizeLongitude(From.Longitude + deltaLongitude)); - } - } -} diff --git a/MapControl/LocationCollection.cs b/MapControl/LocationCollection.cs index 50296464..01509f7c 100644 --- a/MapControl/LocationCollection.cs +++ b/MapControl/LocationCollection.cs @@ -1,20 +1,17 @@ -// WPF MapControl - http://wpfmapcontrol.codeplex.com/ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ // Copyright © 2012 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Globalization; namespace MapControl { /// /// A collection of geographic locations. /// - [TypeConverter(typeof(LocationCollectionConverter))] - public class LocationCollection : ObservableCollection + public partial class LocationCollection : ObservableCollection { public LocationCollection() { @@ -28,11 +25,11 @@ namespace MapControl } } - public static LocationCollection Parse(string source) + public static LocationCollection Parse(string s) { LocationCollection locations = new LocationCollection(); - foreach (string locString in source.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)) + foreach (var locString in s.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)) { locations.Add(Location.Parse(locString)); } @@ -40,20 +37,4 @@ namespace MapControl return locations; } } - - /// - /// Converts from string to LocationCollection. - /// - public class LocationCollectionConverter : TypeConverter - { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - return sourceType == typeof(string); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - return LocationCollection.Parse((string)value); - } - } } diff --git a/MapControl/LocationCollectionConverter.cs b/MapControl/LocationCollectionConverter.cs new file mode 100644 index 00000000..0ef4783e --- /dev/null +++ b/MapControl/LocationCollectionConverter.cs @@ -0,0 +1,28 @@ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +using System; +using System.ComponentModel; +using System.Globalization; + +namespace MapControl +{ + public class LocationCollectionConverter : TypeConverter + { + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + return sourceType == typeof(string); + } + + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + return LocationCollection.Parse((string)value); + } + } + + [TypeConverter(typeof(LocationCollectionConverter))] + public partial class LocationCollection + { + } +} diff --git a/MapControl/LocationConverter.cs b/MapControl/LocationConverter.cs new file mode 100644 index 00000000..3528f692 --- /dev/null +++ b/MapControl/LocationConverter.cs @@ -0,0 +1,28 @@ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +using System; +using System.ComponentModel; +using System.Globalization; + +namespace MapControl +{ + public class LocationConverter : TypeConverter + { + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + return sourceType == typeof(string); + } + + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + return Location.Parse((string)value); + } + } + + [TypeConverter(typeof(LocationConverter))] + public partial class Location + { + } +} diff --git a/MapControl/Map.Silverlight.WPF.cs b/MapControl/Map.Silverlight.WPF.cs new file mode 100644 index 00000000..11c337a9 --- /dev/null +++ b/MapControl/Map.Silverlight.WPF.cs @@ -0,0 +1,64 @@ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +using System; +using System.Windows; +using System.Windows.Input; + +namespace MapControl +{ + public partial class Map + { + partial void Initialize() + { +#if !SILVERLIGHT + ManipulationDelta += OnManipulationDelta; +#endif + MouseWheel += OnMouseWheel; + MouseLeftButtonDown += OnMouseLeftButtonDown; + MouseLeftButtonUp += OnMouseLeftButtonUp; + MouseMove += OnMouseMove; + } + +#if !SILVERLIGHT + private void OnManipulationDelta(object sender, ManipulationDeltaEventArgs e) + { + var d = e.DeltaManipulation; + TransformMap(e.ManipulationOrigin, (Point)d.Translation, d.Rotation, (d.Scale.X + d.Scale.Y) / 2d); + } +#endif + + private void OnMouseWheel(object sender, MouseWheelEventArgs e) + { + ZoomMap(e.GetPosition(this), TargetZoomLevel + mouseWheelZoom * Math.Sign(e.Delta)); + } + + private void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + if (CaptureMouse()) + { + mousePosition = e.GetPosition(this); + } + } + + private void OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e) + { + if (mousePosition.HasValue) + { + mousePosition = null; + ReleaseMouseCapture(); + } + } + + private void OnMouseMove(object sender, MouseEventArgs e) + { + if (mousePosition.HasValue) + { + var position = e.GetPosition(this); + TranslateMap(new Point(position.X - mousePosition.Value.X, position.Y - mousePosition.Value.Y)); + mousePosition = position; + } + } + } +} diff --git a/MapControl/Map.WinRT.cs b/MapControl/Map.WinRT.cs new file mode 100644 index 00000000..9ba36c70 --- /dev/null +++ b/MapControl/Map.WinRT.cs @@ -0,0 +1,68 @@ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +using System; +using Windows.Devices.Input; +using Windows.Foundation; +using Windows.UI.Xaml.Input; + +namespace MapControl +{ + public partial class Map + { + partial void Initialize() + { + ManipulationMode = ManipulationModes.All; + ManipulationDelta += OnManipulationDelta; + PointerWheelChanged += OnPointerWheelChanged; + PointerPressed += OnPointerPressed; + PointerReleased += OnPointerReleased; + PointerCanceled += OnPointerReleased; + PointerCaptureLost += OnPointerReleased; + PointerMoved += OnPointerMoved; + } + + private void OnManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e) + { + if (e.PointerDeviceType != PointerDeviceType.Mouse) + { + TransformMap(e.Position, e.Delta.Translation, e.Delta.Rotation, e.Delta.Scale); + } + } + + private void OnPointerWheelChanged(object sender, PointerRoutedEventArgs e) + { + var point = e.GetCurrentPoint(this); + ZoomMap(point.Position, TargetZoomLevel + mouseWheelZoom * Math.Sign(point.Properties.MouseWheelDelta)); + } + + private void OnPointerPressed(object sender, PointerRoutedEventArgs e) + { + if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse && + CapturePointer(e.Pointer)) + { + mousePosition = e.GetCurrentPoint(this).Position; + } + } + + private void OnPointerReleased(object sender, PointerRoutedEventArgs e) + { + if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse) + { + mousePosition = null; + ReleasePointerCapture(e.Pointer); + } + } + + private void OnPointerMoved(object sender, PointerRoutedEventArgs e) + { + if (mousePosition.HasValue) + { + var position = e.GetCurrentPoint(this).Position; + TranslateMap(new Point(position.X - mousePosition.Value.X, position.Y - mousePosition.Value.Y)); + mousePosition = position; + } + } + } +} diff --git a/MapControl/Map.cs b/MapControl/Map.cs index 17233df3..a73f290b 100644 --- a/MapControl/Map.cs +++ b/MapControl/Map.cs @@ -1,88 +1,34 @@ -// WPF MapControl - http://wpfmapcontrol.codeplex.com/ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ // Copyright © 2012 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -using System; +#if WINRT +using Windows.Foundation; +#else using System.Windows; -using System.Windows.Input; +#endif namespace MapControl { /// /// MapBase with input event handling. /// - public class Map : MapBase + public partial class Map : MapBase { private double mouseWheelZoom = 1d; private Point? mousePosition; + public Map() + { + Initialize(); + } + + partial void Initialize(); + public double MouseWheelZoom { get { return mouseWheelZoom; } set { mouseWheelZoom = value; } } - - protected override void OnMouseWheel(MouseWheelEventArgs e) - { - base.OnMouseWheel(e); - - ZoomMap(e.GetPosition(this), TargetZoomLevel + mouseWheelZoom * Math.Sign(e.Delta)); - } - - protected override void OnMouseRightButtonDown(MouseButtonEventArgs e) - { - base.OnMouseRightButtonDown(e); - - if (e.ClickCount == 2) - { - ZoomMap(e.GetPosition(this), Math.Ceiling(ZoomLevel - 1.5)); - } - } - - protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) - { - base.OnMouseLeftButtonDown(e); - - if (e.ClickCount == 1) - { - mousePosition = e.GetPosition(this); - CaptureMouse(); - } - else if (e.ClickCount == 2) - { - ZoomMap(e.GetPosition(this), Math.Floor(ZoomLevel + 1.5)); - } - } - - protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e) - { - base.OnMouseLeftButtonUp(e); - - if (mousePosition.HasValue) - { - mousePosition = null; - ReleaseMouseCapture(); - } - } - - protected override void OnMouseMove(MouseEventArgs e) - { - base.OnMouseMove(e); - - if (mousePosition.HasValue) - { - Point position = e.GetPosition(this); - TranslateMap(position - mousePosition.Value); - mousePosition = position; - } - } - - protected override void OnManipulationDelta(ManipulationDeltaEventArgs e) - { - base.OnManipulationDelta(e); - - ManipulationDelta d = e.DeltaManipulation; - TransformMap(e.ManipulationOrigin, d.Translation, d.Rotation, (d.Scale.X + d.Scale.Y) / 2d); - } } } diff --git a/MapControl/MapBase.Silverlight.WinRT.cs b/MapControl/MapBase.Silverlight.WinRT.cs new file mode 100644 index 00000000..02b987dc --- /dev/null +++ b/MapControl/MapBase.Silverlight.WinRT.cs @@ -0,0 +1,49 @@ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +#if WINRT +using Windows.Foundation; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Media.Animation; +#else +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Animation; +#endif + +namespace MapControl +{ + public partial class MapBase + { + // Set FillBehavior.HoldEnd to prevent animation from returning + // to local value before invoking the Completed handler + private const FillBehavior AnimationFillBehavior = FillBehavior.HoldEnd; + + public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register( + "Foreground", typeof(Brush), typeof(MapBase), null); + + partial void Initialize() + { + Clip = new RectangleGeometry(); + Children.Add(tileContainer); + + SizeChanged += OnRenderSizeChanged; + } + + private void OnRenderSizeChanged(object sender, SizeChangedEventArgs e) + { + ((RectangleGeometry)Clip).Rect = new Rect(0d, 0d, RenderSize.Width, RenderSize.Height); + ResetTransformOrigin(); + UpdateTransform(); + } + + private void SetTransformMatrixes(double scale) + { + scaleTransform.Matrix = new Matrix(scale, 0d, 0d, scale, 0d, 0d); + rotateTransform.Matrix = Matrix.Identity.Rotate(Heading); + scaleRotateTransform.Matrix = scaleTransform.Matrix.Multiply(rotateTransform.Matrix); + } + } +} diff --git a/MapControl/MapBase.WPF.cs b/MapControl/MapBase.WPF.cs new file mode 100644 index 00000000..4578b1dd --- /dev/null +++ b/MapControl/MapBase.WPF.cs @@ -0,0 +1,66 @@ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ +// Copyright © 2012 Clemens Fischer +// Licensed under the Microsoft Public License (Ms-PL) + +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Media.Animation; + +namespace MapControl +{ + public partial class MapBase + { + // FillBehavior must be set to Stop to re-enable local property values + private const FillBehavior AnimationFillBehavior = FillBehavior.Stop; + + public static readonly DependencyProperty ForegroundProperty = + System.Windows.Controls.Control.ForegroundProperty.AddOwner(typeof(MapBase)); + + static MapBase() + { + UIElement.ClipToBoundsProperty.OverrideMetadata( + typeof(MapBase), new FrameworkPropertyMetadata(true)); + + Panel.BackgroundProperty.OverrideMetadata( + typeof(MapBase), new FrameworkPropertyMetadata(Brushes.Transparent)); + } + + partial void Initialize() + { + AddVisualChild(tileContainer); + + SizeChanged += OnRenderSizeChanged; + } + + private void OnRenderSizeChanged(object sender, SizeChangedEventArgs e) + { + ResetTransformOrigin(); + UpdateTransform(); + } + + private void SetTransformMatrixes(double scale) + { + Matrix rotateMatrix = Matrix.Identity; + rotateMatrix.Rotate(Heading); + rotateTransform.Matrix = rotateMatrix; + scaleTransform.Matrix = new Matrix(scale, 0d, 0d, scale, 0d, 0d); + scaleRotateTransform.Matrix = scaleTransform.Matrix * rotateMatrix; + } + + protected override int VisualChildrenCount + { + get { return InternalChildren.Count + 1; } + } + + protected override Visual GetVisualChild(int index) + { + if (index == 0) + { + return tileContainer; + } + + return InternalChildren[index - 1]; + } + } +} diff --git a/MapControl/MapBase.cs b/MapControl/MapBase.cs index ca3d702a..0821bdcd 100644 --- a/MapControl/MapBase.cs +++ b/MapControl/MapBase.cs @@ -1,170 +1,127 @@ -// WPF MapControl - http://wpfmapcontrol.codeplex.com/ +// XAML Map Control - http://xamlmapcontrol.codeplex.com/ // Copyright © 2012 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) using System; using System.Collections.Specialized; using System.Linq; +#if WINRT +using Windows.Foundation; +using Windows.UI; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Media.Animation; +#else using System.Windows; -using System.Windows.Controls; using System.Windows.Media; using System.Windows.Media.Animation; +#endif namespace MapControl { /// - /// The map control. Draws map content provided by the TileLayers or the BaseTileLayer property. + /// 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. /// - public class MapBase : MapPanel + public partial class MapBase : MapPanel { public const double MeterPerDegree = 1852d * 60d; - - public static readonly DependencyProperty FontSizeProperty = Control.FontSizeProperty.AddOwner(typeof(MapBase)); - public static readonly DependencyProperty FontFamilyProperty = Control.FontFamilyProperty.AddOwner(typeof(MapBase)); - public static readonly DependencyProperty FontStyleProperty = Control.FontStyleProperty.AddOwner(typeof(MapBase)); - public static readonly DependencyProperty FontWeightProperty = Control.FontWeightProperty.AddOwner(typeof(MapBase)); - public static readonly DependencyProperty FontStretchProperty = Control.FontStretchProperty.AddOwner(typeof(MapBase)); - public static readonly DependencyProperty ForegroundProperty = Control.ForegroundProperty.AddOwner(typeof(MapBase)); + public static TimeSpan AnimationDuration = TimeSpan.FromSeconds(0.5); + public static EasingFunctionBase AnimationEasingFunction = new QuadraticEase { EasingMode = EasingMode.EaseOut }; public static readonly DependencyProperty LightForegroundProperty = DependencyProperty.Register( - "LightForeground", typeof(Brush), typeof(MapBase)); + "LightForeground", typeof(Brush), typeof(MapBase), null); public static readonly DependencyProperty DarkForegroundProperty = DependencyProperty.Register( - "DarkForeground", typeof(Brush), typeof(MapBase)); + "DarkForeground", typeof(Brush), typeof(MapBase), null); public static readonly DependencyProperty LightBackgroundProperty = DependencyProperty.Register( - "LightBackground", typeof(Brush), typeof(MapBase)); + "LightBackground", typeof(Brush), typeof(MapBase), new PropertyMetadata(new SolidColorBrush(Colors.Transparent), null)); public static readonly DependencyProperty DarkBackgroundProperty = DependencyProperty.Register( - "DarkBackground", typeof(Brush), typeof(MapBase)); + "DarkBackground", typeof(Brush), typeof(MapBase), new PropertyMetadata(new SolidColorBrush(Colors.Transparent), null)); public static readonly DependencyProperty TileLayersProperty = DependencyProperty.Register( - "TileLayers", typeof(TileLayerCollection), typeof(MapBase), new FrameworkPropertyMetadata( - (o, e) => ((MapBase)o).TileLayersPropertyChanged((TileLayerCollection)e.OldValue, (TileLayerCollection)e.NewValue), - (o, v) => ((MapBase)o).CoerceTileLayersProperty((TileLayerCollection)v))); + "TileLayers", typeof(TileLayerCollection), typeof(MapBase), new PropertyMetadata(null, + (o, e) => ((MapBase)o).TileLayersPropertyChanged((TileLayerCollection)e.OldValue, (TileLayerCollection)e.NewValue))); - public static readonly DependencyProperty BaseTileLayerProperty = DependencyProperty.Register( - "BaseTileLayer", typeof(TileLayer), typeof(MapBase), new FrameworkPropertyMetadata( - (o, e) => ((MapBase)o).BaseTileLayerPropertyChanged((TileLayer)e.NewValue), - (o, v) => ((MapBase)o).CoerceBaseTileLayerProperty((TileLayer)v))); + public static readonly DependencyProperty TileLayerProperty = DependencyProperty.Register( + "TileLayer", typeof(TileLayer), typeof(MapBase), new PropertyMetadata(null, + (o, e) => ((MapBase)o).TileLayerPropertyChanged((TileLayer)e.NewValue))); public static readonly DependencyProperty TileOpacityProperty = DependencyProperty.Register( - "TileOpacity", typeof(double), typeof(MapBase), new FrameworkPropertyMetadata(1d, + "TileOpacity", typeof(double), typeof(MapBase), new PropertyMetadata(1d, (o, e) => ((MapBase)o).tileContainer.Opacity = (double)e.NewValue)); public static readonly DependencyProperty CenterProperty = DependencyProperty.Register( - "Center", typeof(Location), typeof(MapBase), new FrameworkPropertyMetadata(new Location(), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, - (o, e) => ((MapBase)o).CenterPropertyChanged((Location)e.NewValue), - (o, v) => ((MapBase)o).CoerceCenterProperty((Location)v))); + "Center", typeof(Location), typeof(MapBase), new PropertyMetadata(new Location(), + (o, e) => ((MapBase)o).CenterPropertyChanged((Location)e.NewValue))); public static readonly DependencyProperty TargetCenterProperty = DependencyProperty.Register( - "TargetCenter", typeof(Location), typeof(MapBase), new FrameworkPropertyMetadata(new Location(), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, - (o, e) => ((MapBase)o).TargetCenterPropertyChanged((Location)e.NewValue), - (o, v) => ((MapBase)o).CoerceCenterProperty((Location)v))); + "TargetCenter", typeof(Location), typeof(MapBase), new PropertyMetadata(new Location(), + (o, e) => ((MapBase)o).TargetCenterPropertyChanged((Location)e.NewValue))); + + internal static readonly DependencyProperty CenterPointProperty = DependencyProperty.Register( + "CenterPoint", typeof(Point), typeof(MapBase), new PropertyMetadata(new Point(), + (o, e) => ((MapBase)o).CenterPointPropertyChanged((Point)e.NewValue))); + + public static readonly DependencyProperty MinZoomLevelProperty = DependencyProperty.Register( + "MinZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(1d, + (o, e) => ((MapBase)o).MinZoomLevelPropertyChanged((double)e.NewValue))); + + public static readonly DependencyProperty MaxZoomLevelProperty = DependencyProperty.Register( + "MaxZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(18d, + (o, e) => ((MapBase)o).MaxZoomLevelPropertyChanged((double)e.NewValue))); public static readonly DependencyProperty ZoomLevelProperty = DependencyProperty.Register( - "ZoomLevel", typeof(double), typeof(MapBase), new FrameworkPropertyMetadata(1d, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, - (o, e) => ((MapBase)o).ZoomLevelPropertyChanged((double)e.NewValue), - (o, v) => ((MapBase)o).CoerceZoomLevelProperty((double)v))); + "ZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(1d, + (o, e) => ((MapBase)o).ZoomLevelPropertyChanged((double)e.NewValue))); public static readonly DependencyProperty TargetZoomLevelProperty = DependencyProperty.Register( - "TargetZoomLevel", typeof(double), typeof(MapBase), new FrameworkPropertyMetadata(1d, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, - (o, e) => ((MapBase)o).TargetZoomLevelPropertyChanged((double)e.NewValue), - (o, v) => ((MapBase)o).CoerceZoomLevelProperty((double)v))); + "TargetZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(1d, + (o, e) => ((MapBase)o).TargetZoomLevelPropertyChanged((double)e.NewValue))); public static readonly DependencyProperty HeadingProperty = DependencyProperty.Register( - "Heading", typeof(double), typeof(MapBase), new FrameworkPropertyMetadata(0d, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, - (o, e) => ((MapBase)o).HeadingPropertyChanged((double)e.NewValue), - (o, v) => ((MapBase)o).CoerceHeadingProperty((double)v))); + "Heading", typeof(double), typeof(MapBase), new PropertyMetadata(0d, + (o, e) => ((MapBase)o).HeadingPropertyChanged((double)e.NewValue))); public static readonly DependencyProperty TargetHeadingProperty = DependencyProperty.Register( - "TargetHeading", typeof(double), typeof(MapBase), new FrameworkPropertyMetadata(0d, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, - (o, e) => ((MapBase)o).TargetHeadingPropertyChanged((double)e.NewValue), - (o, v) => ((MapBase)o).CoerceHeadingProperty((double)v))); + "TargetHeading", typeof(double), typeof(MapBase), new PropertyMetadata(0d, + (o, e) => ((MapBase)o).TargetHeadingPropertyChanged((double)e.NewValue))); - private static readonly DependencyPropertyKey CenterScalePropertyKey = DependencyProperty.RegisterReadOnly( + public static readonly DependencyProperty CenterScaleProperty = DependencyProperty.Register( "CenterScale", typeof(double), typeof(MapBase), null); - public static readonly DependencyProperty CenterScaleProperty = CenterScalePropertyKey.DependencyProperty; - private readonly TileContainer tileContainer = new TileContainer(); private readonly MapTransform mapTransform = new MercatorTransform(); - private readonly ScaleTransform scaleTransform = new ScaleTransform(); - private readonly RotateTransform rotateTransform = new RotateTransform(); + private readonly MatrixTransform scaleTransform = new MatrixTransform(); + private readonly MatrixTransform rotateTransform = new MatrixTransform(); private readonly MatrixTransform scaleRotateTransform = new MatrixTransform(); private Location transformOrigin; private Point viewportOrigin; - private LocationAnimation centerAnimation; + private PointAnimation centerAnimation; private DoubleAnimation zoomLevelAnimation; private DoubleAnimation headingAnimation; - private bool updateTransform = true; + private bool internalPropertyChange; public MapBase() { - ClipToBounds = true; - MinZoomLevel = 1; - MaxZoomLevel = 20; - - AddVisualChild(tileContainer); + Background = LightBackground; TileLayers = new TileLayerCollection(); + Initialize(); - SetValue(ParentMapPropertyKey, this); - - Loaded += (o, e) => - { - if (BaseTileLayer == null) - { - BaseTileLayer = new TileLayer - { - SourceName = "OpenStreetMap", - Description = "© {y} OpenStreetMap Contributors, CC-BY-SA", - TileSource = new TileSource("http://{c}.tile.openstreetmap.org/{z}/{x}/{y}.png") - }; - } - }; + Loaded += OnLoaded; } + partial void Initialize(); + /// /// Raised when the current viewport has changed. /// public event EventHandler ViewportChanged; - public double MinZoomLevel { get; set; } - public double MaxZoomLevel { get; set; } - - public double FontSize - { - get { return (double)GetValue(FontSizeProperty); } - set { SetValue(FontSizeProperty, value); } - } - - public FontFamily FontFamily - { - get { return (FontFamily)GetValue(FontFamilyProperty); } - set { SetValue(FontFamilyProperty, value); } - } - - public FontStyle FontStyle - { - get { return (FontStyle)GetValue(FontStyleProperty); } - set { SetValue(FontStyleProperty, value); } - } - - public FontWeight FontWeight - { - get { return (FontWeight)GetValue(FontWeightProperty); } - set { SetValue(FontWeightProperty, value); } - } - - public FontStretch FontStretch - { - get { return (FontStretch)GetValue(FontStretchProperty); } - set { SetValue(FontStretchProperty, value); } - } - public Brush Foreground { get { return (Brush)GetValue(ForegroundProperty); } @@ -207,10 +164,10 @@ namespace MapControl /// /// Gets or sets the base TileLayer used by this Map, i.e. TileLayers[0]. /// - public TileLayer BaseTileLayer + public TileLayer TileLayer { - get { return (TileLayer)GetValue(BaseTileLayerProperty); } - set { SetValue(BaseTileLayerProperty, value); } + get { return (TileLayer)GetValue(TileLayerProperty); } + set { SetValue(TileLayerProperty, value); } } /// @@ -240,6 +197,26 @@ namespace MapControl set { SetValue(TargetCenterProperty, value); } } + /// + /// Gets or sets the minimum value of the ZoomLevel and TargetZommLevel properties. + /// Must be greater than or equal to zero and less than or equal to MaxZoomLevel. + /// + public double MinZoomLevel + { + get { return (double)GetValue(MinZoomLevelProperty); } + set { SetValue(MinZoomLevelProperty, value); } + } + + /// + /// Gets or sets the maximum value of the ZoomLevel and TargetZommLevel properties. + /// Must be greater than or equal to MinZoomLevel and less than or equal to 20. + /// + public double MaxZoomLevel + { + get { return (double)GetValue(MaxZoomLevelProperty); } + set { SetValue(MaxZoomLevelProperty, value); } + } + /// /// Gets or sets the map zoom level. /// @@ -282,7 +259,7 @@ namespace MapControl public double CenterScale { get { return (double)GetValue(CenterScaleProperty); } - private set { SetValue(CenterScalePropertyKey, value); } + private set { SetValue(CenterScaleProperty, value); } } /// @@ -326,12 +303,20 @@ namespace MapControl get { return scaleRotateTransform; } } + /// + /// Gets the map scale at the specified location as viewport coordinate units (pixels) per meter. + /// + public double GetMapScale(Location location) + { + return mapTransform.RelativeScale(location) * Math.Pow(2d, ZoomLevel) * 256d / (MeterPerDegree * 360d); + } + /// /// Transforms a geographic location to a viewport coordinates point. /// public Point LocationToViewportPoint(Location location) { - return ViewportTransform.Transform(MapTransform.Transform(location)); + return ViewportTransform.Transform(mapTransform.Transform(location)); } /// @@ -339,7 +324,7 @@ namespace MapControl /// public Location ViewportPointToLocation(Point point) { - return MapTransform.TransformBack(ViewportTransform.Inverse.Transform(point)); + return mapTransform.Transform(ViewportTransform.Inverse.Transform(point)); } /// @@ -360,7 +345,7 @@ namespace MapControl { viewportOrigin.X = Math.Min(Math.Max(origin.X, 0d), RenderSize.Width); viewportOrigin.Y = Math.Min(Math.Max(origin.Y, 0d), RenderSize.Height); - transformOrigin = CoerceCenterProperty(ViewportPointToLocation(viewportOrigin)); + transformOrigin = CoerceLocation(ViewportPointToLocation(viewportOrigin)); } /// @@ -375,18 +360,19 @@ namespace MapControl /// /// Changes the Center property according to the specified translation in viewport coordinates. /// - public void TranslateMap(Vector translation) + public void TranslateMap(Point translation) { if (translation.X != 0d || translation.Y != 0d) { if (transformOrigin != null) { - viewportOrigin += translation; + viewportOrigin.X += translation.X; + viewportOrigin.Y += translation.Y; UpdateTransform(); } else { - Center = ViewportPointToLocation(viewportOrigin - translation); + Center = ViewportPointToLocation(new Point(viewportOrigin.X - translation.X, viewportOrigin.Y - translation.Y)); } } } @@ -396,15 +382,13 @@ namespace MapControl /// viewport coordinate translation, rotation and scale delta values. Rotation and scaling /// is performed relative to the specified origin point in viewport coordinates. /// - public void TransformMap(Point origin, Vector translation, double rotation, double scale) + public void TransformMap(Point origin, Point translation, double rotation, double scale) { if (rotation != 0d || scale != 1d) { SetTransformOrigin(origin); - updateTransform = false; - Heading = (((Heading + rotation) % 360d) + 360d) % 360d; - ZoomLevel += Math.Log(scale, 2d); - updateTransform = true; + SetProperty(HeadingProperty, CoerceHeading(Heading + rotation)); + SetProperty(ZoomLevelProperty, CoerceZoomLevel(ZoomLevel + Math.Log(scale, 2d))); UpdateTransform(); } @@ -418,7 +402,7 @@ namespace MapControl /// public void ZoomMap(Point origin, double zoomLevel) { - double targetZoomLebel = TargetZoomLevel; + var targetZoomLebel = TargetZoomLevel; TargetZoomLevel = zoomLevel; if (TargetZoomLevel != targetZoomLebel) // TargetZoomLevel might be coerced @@ -427,37 +411,6 @@ namespace MapControl } } - /// - /// Gets the map scale at the specified location as viewport coordinate units (pixels) per meter. - /// - public double GetMapScale(Location location) - { - return mapTransform.RelativeScale(location) * Math.Pow(2d, ZoomLevel) * 256d / (MeterPerDegree * 360d); - } - - protected override int VisualChildrenCount - { - get { return InternalChildren.Count + 1; } - } - - protected override Visual GetVisualChild(int index) - { - if (index == 0) - { - return tileContainer; - } - - return InternalChildren[index - 1]; - } - - protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo) - { - base.OnRenderSizeChanged(sizeInfo); - - ResetTransformOrigin(); - UpdateTransform(); - } - protected override void OnViewportChanged() { base.OnViewportChanged(); @@ -468,6 +421,18 @@ namespace MapControl } } + private void OnLoaded(object sender, RoutedEventArgs e) + { + Loaded -= OnLoaded; + + if (TileLayer == null) + { + TileLayer = TileLayer.Default; + } + + UpdateTransform(); + } + private void TileLayerCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { switch (e.Action) @@ -477,12 +442,13 @@ namespace MapControl break; case NotifyCollectionChangedAction.Remove: - tileContainer.RemoveTileLayers(e.OldStartingIndex, e.OldItems.Cast()); + tileContainer.RemoveTileLayers(e.OldStartingIndex, e.OldItems.Count); break; - +#if !SILVERLIGHT case NotifyCollectionChangedAction.Move: +#endif case NotifyCollectionChangedAction.Replace: - tileContainer.RemoveTileLayers(e.OldStartingIndex, e.OldItems.Cast()); + tileContainer.RemoveTileLayers(e.NewStartingIndex, e.OldItems.Count); tileContainer.AddTileLayers(e.NewStartingIndex, e.NewItems.Cast()); break; @@ -493,9 +459,12 @@ namespace MapControl tileContainer.AddTileLayers(0, e.NewItems.Cast()); } break; + + default: + break; } - UpdateBaseTileLayer(); + UpdateTileLayer(); } private void TileLayersPropertyChanged(TileLayerCollection oldTileLayers, TileLayerCollection newTileLayers) @@ -513,34 +482,29 @@ namespace MapControl tileContainer.AddTileLayers(0, newTileLayers); } - UpdateBaseTileLayer(); + UpdateTileLayer(); } - private TileLayerCollection CoerceTileLayersProperty(TileLayerCollection tileLayers) + private void TileLayerPropertyChanged(TileLayer tileLayer) { - if (tileLayers == null) + if (tileLayer != null) { - tileLayers = new TileLayerCollection(); - } + if (TileLayers == null) + { + TileLayers = new TileLayerCollection(); + } - return tileLayers; - } - - private void BaseTileLayerPropertyChanged(TileLayer baseTileLayer) - { - if (baseTileLayer != null) - { if (TileLayers.Count == 0) { - TileLayers.Add(baseTileLayer); + TileLayers.Add(tileLayer); } - else if (TileLayers[0] != baseTileLayer) + else if (TileLayers[0] != tileLayer) { - TileLayers[0] = baseTileLayer; + TileLayers[0] = tileLayer; } } - if (baseTileLayer != null && baseTileLayer.HasDarkBackground) + if (tileLayer != null && tileLayer.HasDarkBackground) { if (DarkForeground != null) { @@ -566,93 +530,175 @@ namespace MapControl } } - private TileLayer CoerceBaseTileLayerProperty(TileLayer baseTileLayer) + private void UpdateTileLayer() { - if (baseTileLayer == null && TileLayers.Count > 0) - { - baseTileLayer = TileLayers[0]; - } + var tileLayer = TileLayers.FirstOrDefault(); - return baseTileLayer; + if (TileLayer != tileLayer) + { + TileLayer = tileLayer; + } } - private void UpdateBaseTileLayer() + private void SetProperty(DependencyProperty property, object value) { - TileLayer baseTileLayer = TileLayers.FirstOrDefault(); + internalPropertyChange = true; + SetValue(property, value); + internalPropertyChange = false; + } - if (BaseTileLayer != baseTileLayer) + private Location CoerceLocation(Location location) + { + return new Location( + Math.Min(Math.Max(location.Latitude, -mapTransform.MaxLatitude), mapTransform.MaxLatitude), + Location.NormalizeLongitude(location.Longitude)); + } + + private bool CoerceCenterProperty(DependencyProperty property, ref Location value) + { + Location coercedValue = CoerceLocation(value); + + if (!coercedValue.Equals(value)) { - BaseTileLayer = baseTileLayer; + SetProperty(property, coercedValue); } + + return coercedValue != value; } private void CenterPropertyChanged(Location center) { - if (updateTransform) + if (!internalPropertyChange) { + CoerceCenterProperty(CenterProperty, ref center); ResetTransformOrigin(); UpdateTransform(); - } - if (centerAnimation == null) - { - TargetCenter = center; + if (centerAnimation == null) + { + SetProperty(TargetCenterProperty, center); + SetProperty(CenterPointProperty, new Point(center.Longitude, center.Latitude)); + } } } private void TargetCenterPropertyChanged(Location targetCenter) { - if (targetCenter != Center) + if (!internalPropertyChange) { - if (centerAnimation != null) + CoerceCenterProperty(TargetCenterProperty, ref targetCenter); + + if (targetCenter != Center) { - centerAnimation.Completed -= CenterAnimationCompleted; + if (centerAnimation != null) + { + centerAnimation.Completed -= CenterAnimationCompleted; + } + + // animate private CenterPoint property by PointAnimation + centerAnimation = new PointAnimation + { + From = new Point(Center.Longitude, Center.Latitude), + To = new Point(targetCenter.Longitude, targetCenter.Latitude), + Duration = AnimationDuration, + FillBehavior = AnimationFillBehavior, + EasingFunction = AnimationEasingFunction + }; + + centerAnimation.Completed += CenterAnimationCompleted; + this.BeginAnimation(CenterPointProperty, centerAnimation); } - - centerAnimation = new LocationAnimation - { - From = Center, - To = targetCenter, - Duration = TimeSpan.FromSeconds(0.5), - FillBehavior = FillBehavior.Stop, - EasingFunction = new QuadraticEase { EasingMode = EasingMode.EaseOut } - }; - - centerAnimation.Completed += CenterAnimationCompleted; - BeginAnimation(CenterProperty, centerAnimation); } } - private void CenterAnimationCompleted(object sender, EventArgs e) + private void CenterAnimationCompleted(object sender, object e) { - Center = TargetCenter; - centerAnimation.Completed -= CenterAnimationCompleted; - centerAnimation = null; + if (centerAnimation != null) + { + centerAnimation.Completed -= CenterAnimationCompleted; + centerAnimation = null; + + SetProperty(CenterProperty, TargetCenter); + SetProperty(CenterPointProperty, new Point(TargetCenter.Longitude, TargetCenter.Latitude)); + ResetTransformOrigin(); + UpdateTransform(); + } } - private Location CoerceCenterProperty(Location location) + private void CenterPointPropertyChanged(Point centerPoint) { - location.Latitude = Math.Min(Math.Max(location.Latitude, -MapTransform.MaxLatitude), MapTransform.MaxLatitude); - location.Longitude = Location.NormalizeLongitude(location.Longitude); - return location; + if (!internalPropertyChange) + { + SetProperty(CenterProperty, new Location(centerPoint.Y, centerPoint.X)); + ResetTransformOrigin(); + UpdateTransform(); + } + } + + private void MinZoomLevelPropertyChanged(double minZoomLevel) + { + var coercedValue = Math.Min(Math.Max(minZoomLevel, 0d), MaxZoomLevel); + + if (coercedValue != minZoomLevel) + { + SetProperty(MinZoomLevelProperty, coercedValue); + } + else if (ZoomLevel < minZoomLevel) + { + ZoomLevel = minZoomLevel; + } + } + + private void MaxZoomLevelPropertyChanged(double maxZoomLevel) + { + var coercedValue = Math.Min(Math.Max(maxZoomLevel, MinZoomLevel), 20d); + + if (coercedValue != maxZoomLevel) + { + SetProperty(MaxZoomLevelProperty, coercedValue); + } + else if (ZoomLevel > maxZoomLevel) + { + ZoomLevel = maxZoomLevel; + } + } + + private double CoerceZoomLevel(double value) + { + return Math.Min(Math.Max(value, MinZoomLevel), MaxZoomLevel); + } + + private bool CoerceZoomLevelProperty(DependencyProperty property, ref double value) + { + var coercedValue = CoerceZoomLevel(value); + + if (coercedValue != value) + { + SetProperty(property, coercedValue); + } + + return coercedValue != value; } private void ZoomLevelPropertyChanged(double zoomLevel) { - if (updateTransform) + if (!internalPropertyChange && + !CoerceZoomLevelProperty(ZoomLevelProperty, ref zoomLevel)) { UpdateTransform(); - } - if (zoomLevelAnimation == null) - { - TargetZoomLevel = zoomLevel; + if (zoomLevelAnimation == null) + { + SetProperty(TargetZoomLevelProperty, zoomLevel); + } } } private void TargetZoomLevelPropertyChanged(double targetZoomLevel) { - if (targetZoomLevel != ZoomLevel) + if (!internalPropertyChange && + !CoerceZoomLevelProperty(TargetZoomLevelProperty, ref targetZoomLevel) && + targetZoomLevel != ZoomLevel) { if (zoomLevelAnimation != null) { @@ -661,88 +707,109 @@ namespace MapControl zoomLevelAnimation = new DoubleAnimation { - From = ZoomLevel, To = targetZoomLevel, - Duration = TimeSpan.FromSeconds(0.5), - FillBehavior = FillBehavior.Stop, - EasingFunction = new QuadraticEase { EasingMode = EasingMode.EaseOut } + Duration = AnimationDuration, + FillBehavior = AnimationFillBehavior, + EasingFunction = AnimationEasingFunction }; zoomLevelAnimation.Completed += ZoomLevelAnimationCompleted; - BeginAnimation(ZoomLevelProperty, zoomLevelAnimation); + this.BeginAnimation(ZoomLevelProperty, zoomLevelAnimation); } } - private void ZoomLevelAnimationCompleted(object sender, EventArgs e) + private void ZoomLevelAnimationCompleted(object sender, object e) { - ZoomLevel = TargetZoomLevel; - zoomLevelAnimation.Completed -= ZoomLevelAnimationCompleted; - zoomLevelAnimation = null; - ResetTransformOrigin(); + if (zoomLevelAnimation != null) + { + zoomLevelAnimation.Completed -= ZoomLevelAnimationCompleted; + zoomLevelAnimation = null; + + SetProperty(ZoomLevelProperty, TargetZoomLevel); + UpdateTransform(); + ResetTransformOrigin(); + } } - private double CoerceZoomLevelProperty(double zoomLevel) + private double CoerceHeading(double value) { - return Math.Min(Math.Max(zoomLevel, MinZoomLevel), MaxZoomLevel); + return (value >= -180d && value <= 360d) ? value : ((value + 360d) % 360d); + } + + private bool CoerceHeadingProperty(DependencyProperty property, ref double value) + { + var coercedValue = CoerceHeading(value); + + if (coercedValue != value) + { + SetProperty(property, coercedValue); + } + + return coercedValue != value; } private void HeadingPropertyChanged(double heading) { - if (updateTransform) + if (!internalPropertyChange) { + CoerceHeadingProperty(HeadingProperty, ref heading); UpdateTransform(); - } - if (headingAnimation == null) - { - TargetHeading = heading; + if (headingAnimation == null) + { + SetProperty(TargetHeadingProperty, heading); + } } } private void TargetHeadingPropertyChanged(double targetHeading) { - if (targetHeading != Heading) + if (!internalPropertyChange) { - if (headingAnimation != null) + CoerceHeadingProperty(TargetHeadingProperty, ref targetHeading); + + if (targetHeading != Heading) { - headingAnimation.Completed -= HeadingAnimationCompleted; + var delta = targetHeading - Heading; + + if (delta > 180d) + { + delta -= 360d; + } + else if (delta < -180d) + { + delta += 360d; + } + + if (headingAnimation != null) + { + headingAnimation.Completed -= HeadingAnimationCompleted; + } + + headingAnimation = new DoubleAnimation + { + By = delta, + Duration = AnimationDuration, + FillBehavior = AnimationFillBehavior, + EasingFunction = AnimationEasingFunction + }; + + headingAnimation.Completed += HeadingAnimationCompleted; + this.BeginAnimation(HeadingProperty, headingAnimation); } - - double delta = targetHeading - Heading; - - if (delta > 180d) - { - delta -= 360d; - } - else if (delta < -180d) - { - delta += 360d; - } - - headingAnimation = new DoubleAnimation - { - From = Heading, - By = delta, - Duration = TimeSpan.FromSeconds(0.5), - FillBehavior = FillBehavior.Stop, - EasingFunction = new QuadraticEase { EasingMode = EasingMode.EaseOut } - }; - - headingAnimation.Completed += HeadingAnimationCompleted; - BeginAnimation(HeadingProperty, headingAnimation); } } - private void HeadingAnimationCompleted(object sender, EventArgs e) + private void HeadingAnimationCompleted(object sender, object e) { - Heading = TargetHeading; - headingAnimation.Completed -= HeadingAnimationCompleted; - headingAnimation = null; - } + if (headingAnimation != null) + { + headingAnimation.Completed -= HeadingAnimationCompleted; + headingAnimation = null; - private double CoerceHeadingProperty(double heading) - { - return ((heading % 360d) + 360d) % 360d; + SetProperty(HeadingProperty, TargetHeading); + UpdateTransform(); + } } private void UpdateTransform() @@ -751,23 +818,17 @@ namespace MapControl if (transformOrigin != null) { - scale = tileContainer.SetViewportTransform(ZoomLevel, Heading, MapTransform.Transform(transformOrigin), viewportOrigin, RenderSize); - updateTransform = false; - Center = ViewportPointToLocation(new Point(RenderSize.Width / 2d, RenderSize.Height / 2d)); - updateTransform = true; + scale = tileContainer.SetViewportTransform(ZoomLevel, Heading, mapTransform.Transform(transformOrigin), viewportOrigin, RenderSize); + SetProperty(CenterProperty, ViewportPointToLocation(new Point(RenderSize.Width / 2d, RenderSize.Height / 2d))); } else { - scale = tileContainer.SetViewportTransform(ZoomLevel, Heading, MapTransform.Transform(Center), viewportOrigin, RenderSize); + scale = tileContainer.SetViewportTransform(ZoomLevel, Heading, mapTransform.Transform(Center), viewportOrigin, RenderSize); } - scale *= MapTransform.RelativeScale(Center) / MeterPerDegree; // Pixels per meter at center latitude - + scale *= mapTransform.RelativeScale(Center) / MeterPerDegree; // Pixels per meter at center latitude CenterScale = scale; - scaleTransform.ScaleX = scale; - scaleTransform.ScaleY = scale; - rotateTransform.Angle = Heading; - scaleRotateTransform.Matrix = scaleTransform.Value * rotateTransform.Value; + SetTransformMatrixes(scale); OnViewportChanged(); } diff --git a/MapControl/MapControl.Silverlight.csproj b/MapControl/MapControl.Silverlight.csproj new file mode 100644 index 00000000..f2183a52 --- /dev/null +++ b/MapControl/MapControl.Silverlight.csproj @@ -0,0 +1,132 @@ + + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {EB133B78-DEFF-416A-8F0C-89E54D766576} + {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + MapControl + MapControl.Silverlight + Silverlight + v5.0 + $(TargetFrameworkVersion) + false + true + true + + + + + v3.5 + + + true + full + false + bin\Debug\ + DEBUG;TRACE;SILVERLIGHT + true + true + prompt + 4 + false + + + none + true + bin\Release\ + TRACE;SILVERLIGHT + true + true + prompt + 4 + false + + + OnBuildSuccess + + + + + + + $(TargetFrameworkDirectory)System.Core.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + MSBuild:Compile + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MapControl/MapControl.Silverlight.csproj.user b/MapControl/MapControl.Silverlight.csproj.user new file mode 100644 index 00000000..8b80b1f4 --- /dev/null +++ b/MapControl/MapControl.Silverlight.csproj.user @@ -0,0 +1,29 @@ + + + + + + + + + DynamicPage + True + False + False + + + + + + + + + True + + + True + + + + + \ No newline at end of file diff --git a/MapControl/MapControl.csproj b/MapControl/MapControl.WPF.csproj similarity index 65% rename from MapControl/MapControl.csproj rename to MapControl/MapControl.WPF.csproj index 7a9ed90e..461cc10d 100644 --- a/MapControl/MapControl.csproj +++ b/MapControl/MapControl.WPF.csproj @@ -1,19 +1,17 @@  + Debug AnyCPU - 8.0.30703 - 2.0 - {06481252-2310-414A-B9FC-D5739FDF6BD3} + {226F3575-B683-446D-A2F0-181291DC8787} Library Properties MapControl - MapControl - v4.0 + MapControl.WPF + v4.5 512 - - + true @@ -23,17 +21,19 @@ TRACE;DEBUG prompt 4 - false + false none true bin\Release\ - - + TRACE prompt 4 - false + false + + + OnBuildSuccess @@ -45,40 +45,62 @@ - - + + - - - - - - - - - - - - - + + + + + Code + + + + + + + + + + + + + - + + + + + + + + + - MSBuild:Compile Designer + MSBuild:Compile + + + + + + + + + + \ No newline at end of file diff --git a/MapControl/WinRT/Properties/AssemblyInfo.cs b/MapControl/WinRT/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..b0b5435a --- /dev/null +++ b/MapControl/WinRT/Properties/AssemblyInfo.cs @@ -0,0 +1,14 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("MapControl.WinRT")] +[assembly: AssemblyDescription("XAML Map Control for Windows Runtime")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Clemens Fischer")] +[assembly: AssemblyProduct("XAML Map Control")] +[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] diff --git a/MapControl/WinRT/ReadMe.txt b/MapControl/WinRT/ReadMe.txt new file mode 100644 index 00000000..b1640122 --- /dev/null +++ b/MapControl/WinRT/ReadMe.txt @@ -0,0 +1,4 @@ + +The Visual Studio Project for Windows Runtime resides in a seperate folder +MapControl/WinRT, because it needs to have its own Themes/Generic.xaml file. +Output is generated to ../bin. \ No newline at end of file diff --git a/MapControl/WinRT/Themes/Generic.xaml b/MapControl/WinRT/Themes/Generic.xaml new file mode 100644 index 00000000..99f00547 --- /dev/null +++ b/MapControl/WinRT/Themes/Generic.xaml @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file diff --git a/SampleApps/SampleApplication/Properties/AssemblyInfo.cs b/SampleApps/SampleApplication/Properties/AssemblyInfo.cs deleted file mode 100644 index 37bee287..00000000 --- a/SampleApps/SampleApplication/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SampleApplication")] -[assembly: AssemblyDescription("WPF Map Control Sample Application")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Clemens Fischer")] -[assembly: AssemblyProduct("WPF Map Control")] -[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SampleApps/SilverlightApplication.Web/ClientBin/SilverlightApplication.xap b/SampleApps/SilverlightApplication.Web/ClientBin/SilverlightApplication.xap new file mode 100644 index 0000000000000000000000000000000000000000..8515eaf1df53cdbe5262377699f12ac5eb44d3d3 GIT binary patch literal 33189 zcmV)TK(W72O9KQH000OG04%3=L9&R=sm1{S0Nn)u01yBG06}nYO<`_nW@U49E_h*W zY_(KPPa821y;tgguzarUq*7^>l1QONRSrNz(sFjZldOe5w)QN$``dcxPwHR53nf{= zo4^6d2W#G&c{AfD|NHaz_&XHZ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F1BeFzd#A_3 literal 0 HcmV?d00001 diff --git a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..a3649625 --- /dev/null +++ b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs @@ -0,0 +1,14 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("SilverlightApplication.Web")] +[assembly: AssemblyDescription("XAML Map Control Sample Application for Silverlight")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Clemens Fischer")] +[assembly: AssemblyProduct("XAML Map Control")] +[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication.Web/Silverlight.js b/SampleApps/SilverlightApplication.Web/Silverlight.js new file mode 100644 index 00000000..80ff3970 --- /dev/null +++ b/SampleApps/SilverlightApplication.Web/Silverlight.js @@ -0,0 +1,2 @@ +//v2.0.30511.0 +if(!window.Silverlight)window.Silverlight={};Silverlight._silverlightCount=0;Silverlight.__onSilverlightInstalledCalled=false;Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";Silverlight.__installationEventFired=false;Silverlight.onGetSilverlight=null;Silverlight.onSilverlightInstalled=function(){window.location.reload(false)};Silverlight.isInstalled=function(b){if(b==undefined)b=null;var a=false,m=null;try{var i=null,j=false;if(window.ActiveXObject)try{i=new ActiveXObject("AgControl.AgControl");if(b===null)a=true;else if(i.IsVersionSupported(b))a=true;i=null}catch(l){j=true}else j=true;if(j){var k=navigator.plugins["Silverlight Plug-In"];if(k)if(b===null)a=true;else{var h=k.description;if(h==="1.0.30226.2")h="2.0.30226.2";var c=h.split(".");while(c.length>3)c.pop();while(c.length<4)c.push(0);var e=b.split(".");while(e.length>4)e.pop();var d,g,f=0;do{d=parseInt(e[f]);g=parseInt(c[f]);f++}while(f");delete a.id;delete a.width;delete a.height;for(var c in a)if(a[c])b.push('');b.push("");return b.join("")};Silverlight.createObjectEx=function(b){var a=b,c=Silverlight.createObject(a.source,a.parentElement,a.id,a.properties,a.events,a.initParams,a.context);if(a.parentElement==null)return c};Silverlight.buildPromptHTML=function(b){var a="",d=Silverlight.fwlinkRoot,c=b.version;if(b.alt)a=b.alt;else{if(!c)c="";a="Get Microsoft Silverlight";a=a.replace("{1}",c);a=a.replace("{2}",d+"108181")}return a};Silverlight.getSilverlight=function(e){if(Silverlight.onGetSilverlight)Silverlight.onGetSilverlight();var b="",a=String(e).split(".");if(a.length>1){var c=parseInt(a[0]);if(isNaN(c)||c<2)b="1.0";else b=a[0]+"."+a[1]}var d="";if(b.match(/^\d+\056\d+$/))d="&v="+b;Silverlight.followFWLink("149156"+d)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(c){var a,b="";if(c==null)return null;for(var d=0;d96&&a<123||a>64&&a<91||a>43&&a<58&&a!=47||a==95)b=b+String.fromCharCode(a);else b=b+"&#"+a+";"}return b};Silverlight.default_error_handler=function(e,b){var d,c=b.ErrorType;d=b.ErrorCode;var a="\nSilverlight error message \n";a+="ErrorCode: "+d+"\n";a+="ErrorType: "+c+" \n";a+="Message: "+b.ErrorMessage+" \n";if(c=="ParserError"){a+="XamlFile: "+b.xamlFile+" \n";a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}else if(c=="RuntimeError"){if(b.lineNumber!=0){a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}a+="MethodName: "+b.methodName+" \n"}alert(a)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--)window["__slEvent"+a]=null;Silverlight._silverlightCount=0;if(window.removeEventListener)window.removeEventListener("unload",Silverlight.__cleanup,false);else window.detachEvent("onunload",Silverlight.__cleanup)};Silverlight.__getHandlerName=function(b){var a="";if(typeof b=="string")a=b;else if(typeof b=="function"){if(Silverlight._silverlightCount==0)if(window.addEventListener)window.addEventListener("onunload",Silverlight.__cleanup,false);else window.attachEvent("onunload",Silverlight.__cleanup);var c=Silverlight._silverlightCount++;a="__slEvent"+c;window[a]=b}else a=null;return a};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(d,a){var b=false;try{if(a.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==5014||a.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost()))b=true}else b=true}catch(c){}return b};Silverlight.IsVersionAvailableOnLoad=function(b){var a=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(b.getHost()))a=true}catch(c){}return a};Silverlight.__verifySilverlight2UpgradeSuccess=function(d){var c=false,b="2.0.31005",a=null;try{if(d.IsVersionSupported(b+".99")){a=Silverlight.onRequiredVersionAvailable;c=true}else if(d.IsVersionSupported(b+".0"))a=Silverlight.onRestartRequired;else a=Silverlight.onUpgradeRequired;if(a&&!Silverlight.__installationEventFired){a();Silverlight.__installationEventFired=true}}catch(e){}return c} \ No newline at end of file diff --git a/SampleApps/SilverlightApplication.Web/SilverlightApplication.Web.csproj b/SampleApps/SilverlightApplication.Web/SilverlightApplication.Web.csproj new file mode 100644 index 00000000..8d49a3da --- /dev/null +++ b/SampleApps/SilverlightApplication.Web/SilverlightApplication.Web.csproj @@ -0,0 +1,111 @@ + + + + + Debug + AnyCPU + + + 2.0 + {177C4EF8-0B0A-426E-BDCC-168DC10AC1C1} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + SilverlightApplication.Web + SilverlightApplication.Web + v4.5 + true + + + + + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}|..\SilverlightApplication\SilverlightApplication.csproj|ClientBin|False + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + none + true + bin\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Web.config + + + Web.config + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 51248 + / + http://localhost:51216/ + False + False + + + False + + + + + + \ No newline at end of file diff --git a/SampleApps/SilverlightApplication.Web/SilverlightApplication.Web.csproj.user b/SampleApps/SilverlightApplication.Web/SilverlightApplication.Web.csproj.user new file mode 100644 index 00000000..9d7fcd03 --- /dev/null +++ b/SampleApps/SilverlightApplication.Web/SilverlightApplication.Web.csproj.user @@ -0,0 +1,30 @@ + + + + + + + SilverlightApplicationTestPage.aspx + SpecificPage + True + True + False + False + + + + + + + + + False + True + + SilverlightApplication.xap + + + + + + \ No newline at end of file diff --git a/SampleApps/SilverlightApplication.Web/SilverlightApplicationTestPage.aspx b/SampleApps/SilverlightApplication.Web/SilverlightApplicationTestPage.aspx new file mode 100644 index 00000000..1a44243e --- /dev/null +++ b/SampleApps/SilverlightApplication.Web/SilverlightApplicationTestPage.aspx @@ -0,0 +1,74 @@ +<%@ Page Language="C#" AutoEventWireup="true" %> + + + + + SilverlightApplication + + + + + +
+
+ + + + + + + + Get Microsoft Silverlight + +
+
+ + diff --git a/SampleApps/SilverlightApplication.Web/SilverlightApplicationTestPage.html b/SampleApps/SilverlightApplication.Web/SilverlightApplicationTestPage.html new file mode 100644 index 00000000..ae8695d0 --- /dev/null +++ b/SampleApps/SilverlightApplication.Web/SilverlightApplicationTestPage.html @@ -0,0 +1,73 @@ + + + + + SilverlightApplication + + + + + +
+
+ + + + + + + + Get Microsoft Silverlight + +
+
+ + diff --git a/SampleApps/SilverlightApplication.Web/Web.Debug.config b/SampleApps/SilverlightApplication.Web/Web.Debug.config new file mode 100644 index 00000000..2e302f9f --- /dev/null +++ b/SampleApps/SilverlightApplication.Web/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/SampleApps/SilverlightApplication.Web/Web.Release.config b/SampleApps/SilverlightApplication.Web/Web.Release.config new file mode 100644 index 00000000..c3584446 --- /dev/null +++ b/SampleApps/SilverlightApplication.Web/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/SampleApps/SilverlightApplication.Web/Web.config b/SampleApps/SilverlightApplication.Web/Web.config new file mode 100644 index 00000000..6da78ec8 --- /dev/null +++ b/SampleApps/SilverlightApplication.Web/Web.config @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/SampleApps/SilverlightApplication/App.xaml b/SampleApps/SilverlightApplication/App.xaml new file mode 100644 index 00000000..151ab06a --- /dev/null +++ b/SampleApps/SilverlightApplication/App.xaml @@ -0,0 +1,6 @@ + + + + diff --git a/SampleApps/SilverlightApplication/App.xaml.cs b/SampleApps/SilverlightApplication/App.xaml.cs new file mode 100644 index 00000000..16c1ecb2 --- /dev/null +++ b/SampleApps/SilverlightApplication/App.xaml.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Shapes; + +namespace SilverlightApplication +{ + public partial class App : Application + { + + public App() + { + this.Startup += this.Application_Startup; + this.Exit += this.Application_Exit; + this.UnhandledException += this.Application_UnhandledException; + + InitializeComponent(); + } + + private void Application_Startup(object sender, StartupEventArgs e) + { + this.RootVisual = new MainPage(); + } + + private void Application_Exit(object sender, EventArgs e) + { + + } + + private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) + { + // If the app is running outside of the debugger then report the exception using + // the browser's exception mechanism. On IE this will display it a yellow alert + // icon in the status bar and Firefox will display a script error. + if (!System.Diagnostics.Debugger.IsAttached) + { + + // NOTE: This will allow the application to continue running after an exception has been thrown + // but not handled. + // For production applications this error handling should be replaced with something that will + // report the error to the website and stop the application. + e.Handled = true; + Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); }); + } + } + + private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e) + { + try + { + string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace; + errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n"); + + System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");"); + } + catch (Exception) + { + } + } + } +} diff --git a/SampleApps/SilverlightApplication/MainPage.xaml b/SampleApps/SilverlightApplication/MainPage.xaml new file mode 100644 index 00000000..b0223373 --- /dev/null +++ b/SampleApps/SilverlightApplication/MainPage.xaml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OpenStreetMap + OpenCycleMap + OCM Transport + OCM Landscape + MapQuest OSM + + + + + diff --git a/SampleApps/SilverlightApplication/MainPage.xaml.cs b/SampleApps/SilverlightApplication/MainPage.xaml.cs new file mode 100644 index 00000000..56e59501 --- /dev/null +++ b/SampleApps/SilverlightApplication/MainPage.xaml.cs @@ -0,0 +1,153 @@ +using MapControl; +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Threading; + +namespace SilverlightApplication +{ + public partial class MainPage : UserControl + { + private SamplePoint movingPoint = new SamplePoint + { + Name = "Moving", + Location = new Location(53.5, 8.25) + }; + + public MainPage() + { + InitializeComponent(); + + ICollection polylines = (ICollection)Resources["Polylines"]; + polylines.Add( + new SamplePolyline + { + Locations = LocationCollection.Parse("53.5140,8.1451 53.5123,8.1506 53.5156,8.1623 53.5276,8.1757 53.5491,8.1852 53.5495,8.1877 53.5426,8.1993 53.5184,8.2219 53.5182,8.2386 53.5195,8.2387") + }); + polylines.Add( + new SamplePolyline + { + Locations = LocationCollection.Parse("53.5978,8.1212 53.6018,8.1494 53.5859,8.1554 53.5852,8.1531 53.5841,8.1539 53.5802,8.1392 53.5826,8.1309 53.5867,8.1317 53.5978,8.1212") + }); + + ICollection points = (ICollection)Resources["Points"]; + points.Add( + new SamplePoint + { + Name = "Steinbake Leitdamm", + Location = new Location(53.51217, 8.16603) + }); + points.Add( + new SamplePoint + { + Name = "Buhne 2", + Location = new Location(53.50926, 8.15815) + }); + points.Add( + new SamplePoint + { + Name = "Buhne 4", + Location = new Location(53.50468, 8.15343) + }); + points.Add( + new SamplePoint + { + Name = "Buhne 6", + Location = new Location(53.50092, 8.15267) + }); + points.Add( + new SamplePoint + { + Name = "Buhne 8", + Location = new Location(53.49871, 8.15321) + }); + points.Add( + new SamplePoint + { + Name = "Buhne 10", + Location = new Location(53.49350, 8.15563) + }); + points.Add(movingPoint); + + ICollection pushpins = (ICollection)Resources["Pushpins"]; + pushpins.Add( + new SamplePoint + { + Name = "WHV - Eckwarderhörne", + Location = new Location(53.5495, 8.1877) + }); + pushpins.Add( + new SamplePoint + { + Name = "JadeWeserPort", + Location = new Location(53.5914, 8.14) + }); + pushpins.Add( + new SamplePoint + { + Name = "Kurhaus Dangast", + Location = new Location(53.447, 8.1114) + }); + pushpins.Add( + new SamplePoint + { + Name = "Eckwarderhörne", + Location = new Location(53.5207, 8.2323) + }); + + DispatcherTimer timer = new DispatcherTimer(); + timer.Interval = TimeSpan.FromSeconds(0.1); + timer.Tick += MovePoint; + timer.Start(); + } + + private void MovePoint(object sender, EventArgs e) + { + movingPoint.Location = new Location(movingPoint.Location.Latitude + 0.001, movingPoint.Location.Longitude + 0.002); + + if (movingPoint.Location.Latitude > 54d) + { + movingPoint.Name = "Stopped"; + ((DispatcherTimer)sender).Stop(); + } + } + + private void MapMouseLeave(object sender, MouseEventArgs e) + { + mouseLocation.Text = string.Empty; + } + + private void MapMouseMove(object sender, MouseEventArgs e) + { + mouseLocation.Text = map.ViewportPointToLocation(e.GetPosition(map)).ToString(); + } + + private void TileLayerSelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (map != null) + { + var comboBox = (ComboBox)sender; + var tileLayers = (TileLayerCollection)Resources["TileLayers"]; + map.TileLayer = tileLayers[(string)comboBox.SelectedItem]; + } + } + + private void SeamarksClick(object sender, RoutedEventArgs e) + { + var checkBox = (CheckBox)sender; + var tileLayers = (TileLayerCollection)Resources["TileLayers"]; + var tileLayer = tileLayers["Seamarks"]; + + if ((bool)checkBox.IsChecked) + { + map.TileLayers.Add(tileLayer); + } + else + { + map.TileLayers.Remove(tileLayer); + } + } + } +} diff --git a/SampleApps/SilverlightApplication/Properties/AppManifest.xml b/SampleApps/SilverlightApplication/Properties/AppManifest.xml new file mode 100644 index 00000000..8872fdcb --- /dev/null +++ b/SampleApps/SilverlightApplication/Properties/AppManifest.xml @@ -0,0 +1,5 @@ + + + + diff --git a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..01d91aa4 --- /dev/null +++ b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs @@ -0,0 +1,14 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("SilverlightApplication")] +[assembly: AssemblyDescription("XAML Map Control Sample Application for Silverlight")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Clemens Fischer")] +[assembly: AssemblyProduct("XAML Map Control")] +[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication/Properties/InBrowserSettings.xml b/SampleApps/SilverlightApplication/Properties/InBrowserSettings.xml new file mode 100644 index 00000000..823301b0 --- /dev/null +++ b/SampleApps/SilverlightApplication/Properties/InBrowserSettings.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/SampleApps/SilverlightApplication/Properties/OutOfBrowserSettings.xml b/SampleApps/SilverlightApplication/Properties/OutOfBrowserSettings.xml new file mode 100644 index 00000000..a1f52331 --- /dev/null +++ b/SampleApps/SilverlightApplication/Properties/OutOfBrowserSettings.xml @@ -0,0 +1,10 @@ + + SilverlightApplication Application on your desktop; at home, at work or on the go. + + + + + + + + \ No newline at end of file diff --git a/SampleApps/SilverlightApplication/SampleItems.cs b/SampleApps/SilverlightApplication/SampleItems.cs new file mode 100644 index 00000000..322f3733 --- /dev/null +++ b/SampleApps/SilverlightApplication/SampleItems.cs @@ -0,0 +1,51 @@ +using MapControl; +using System.Collections.ObjectModel; +using System.ComponentModel; + +namespace SilverlightApplication +{ + public class SamplePoint : INotifyPropertyChanged + { + private string name; + private Location location; + + public event PropertyChangedEventHandler PropertyChanged; + + public string Name + { + get { return name; } + set + { + name = value; + OnPropertyChanged("Name"); + } + } + + public Location Location + { + get { return location; } + set + { + location = value; + OnPropertyChanged("Location"); + } + } + + private void OnPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + public class SamplePolyline + { + public LocationCollection Locations { get; set; } + } + + public class SampleItemCollection : ObservableCollection + { + } +} diff --git a/SampleApps/SilverlightApplication/SilverlightApplication.csproj b/SampleApps/SilverlightApplication/SilverlightApplication.csproj new file mode 100644 index 00000000..8265ae75 --- /dev/null +++ b/SampleApps/SilverlightApplication/SilverlightApplication.csproj @@ -0,0 +1,125 @@ + + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {CBA8C535-CCA3-4F60-8D3E-0E25791CBD21} + {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + SilverlightApplication + SilverlightApplication + Silverlight + v5.0 + $(TargetFrameworkVersion) + true + + + true + true + SilverlightApplication.xap + Properties\AppManifest.xml + SilverlightApplication.App + SilverlightApplicationTestPage.html + true + true + true + Properties\OutOfBrowserSettings.xml + false + true + + + Properties\InBrowserSettings.xml + false + + + + v3.5 + + + true + full + false + Bin\Debug + DEBUG;TRACE;SILVERLIGHT + true + true + prompt + 4 + + + none + true + Bin\Release + TRACE;SILVERLIGHT + true + true + prompt + 4 + + + + + + + $(TargetFrameworkDirectory)System.Core.dll + + + + + + + + App.xaml + + + MainPage.xaml + + + + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + + + + + + + + + + {eb133b78-deff-416a-8f0c-89e54d766576} + MapControl.Silverlight + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleApps/SilverlightApplication/SilverlightApplication.csproj.user b/SampleApps/SilverlightApplication/SilverlightApplication.csproj.user new file mode 100644 index 00000000..d619cbfc --- /dev/null +++ b/SampleApps/SilverlightApplication/SilverlightApplication.csproj.user @@ -0,0 +1,28 @@ + + + + + + + + + OfflineApplication + True + False + False + + + + + + + + + True + SilverlightApplication.Web + True + + + + + \ No newline at end of file diff --git a/SampleApps/StoreApplication/App.xaml b/SampleApps/StoreApplication/App.xaml new file mode 100644 index 00000000..d27be263 --- /dev/null +++ b/SampleApps/StoreApplication/App.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + diff --git a/SampleApps/StoreApplication/App.xaml.cs b/SampleApps/StoreApplication/App.xaml.cs new file mode 100644 index 00000000..9663b8dc --- /dev/null +++ b/SampleApps/StoreApplication/App.xaml.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227 + +namespace StoreApplication +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + sealed partial class App : Application + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + this.Suspending += OnSuspending; + } + + /// + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used when the application is launched to open a specific file, to display + /// search results, and so forth. + /// + /// Details about the launch request and process. + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + Frame rootFrame = Window.Current.Content as Frame; + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (rootFrame == null) + { + // Create a Frame to act as the navigation context and navigate to the first page + rootFrame = new Frame(); + + if (args.PreviousExecutionState == ApplicationExecutionState.Terminated) + { + //TODO: Load state from previously suspended application + } + + // Place the frame in the current Window + Window.Current.Content = rootFrame; + } + + if (rootFrame.Content == null) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + if (!rootFrame.Navigate(typeof(MainPage), args.Arguments)) + { + throw new Exception("Failed to create initial page"); + } + } + // Ensure the current window is active + Window.Current.Activate(); + } + + /// + /// Invoked when application execution is being suspended. Application state is saved + /// without knowing whether the application will be terminated or resumed with the contents + /// of memory still intact. + /// + /// The source of the suspend request. + /// Details about the suspend request. + private void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + //TODO: Save application state and stop any background activity + deferral.Complete(); + } + } +} diff --git a/SampleApps/StoreApplication/Assets/Logo.png b/SampleApps/StoreApplication/Assets/Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e26771cb33a49bbef824aa333737181b0a5b09a3 GIT binary patch literal 801 zcmeAS@N?(olHy`uVBq!ia0vp^(?FPm4M^HB7Cr(}k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+m=1foIEGZ*dUJQLud<^=L*gE#63Ho!PGzwUb%GPK6&5iF zt!p@aGNX}6(PVh|N)M-?0RNcTbjaWgEU8noxUax-n>&3Ay)#!y&O11y2sKEF zt72@XC1)RvT6Xw=y_`Ce)`nGULLL^lI$kwi^E+dQT7YeXY4GvlRR%kj1x$VZi%Bdd zz}2Giy=-_$h+v#(S+};)DuE4EM?_^qB_eDeo@&q%StD1F>L|*0ZC2sb-}llSMTM?O z6{b3iid~yk@VE7q7Wb+P8?H5IYp?pSVcLE~18m#ygK20HL@6W5woI~Fjlw$fX1U{xQA5a+t0 zH$WNIb=fNpWHo}M9#;K6eszDZKty_|-?j4iocj5#zotrWc;@;w`H@=mjsvS2wXX0_ zY}l$4@^sE?UcC)ji*L=Z&}P!xaL&2((OQlj2dv~pV-ifAS;ZsH1{`D!GY%yys5WH)f>ZLo5m%6XjuXdbKMR7MEHSyb{m!_{Afji&MT$_sz7 z>1{~MlIFe28FRN(GC_~;#Jp4ADipP+9hh|P#-&`vO-Upt3jE0@YLh(^55uYWl9g)Z RA3>Rb!PC{xWt~$(69A&hN*MqE literal 0 HcmV?d00001 diff --git a/SampleApps/StoreApplication/Assets/SmallLogo.png b/SampleApps/StoreApplication/Assets/SmallLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..1eb0d9d528c42f132872e8af4dc563081b0b9aff GIT binary patch literal 329 zcmV-P0k-~$P)q$gGRCwC#*X;?zAP@%N+|i#I!$mrh zlQ>KU$Rdu>|JH&931_?y6Djl{gb>4nCV5pzDJ?S!mq|4ZejKj%i@j$H{#ML~2Y{DF z$=}bKPaz+UGt{v(4CTQQXym}&iW8{s!ew~XIE7NLjQpy#I2S$rous$~?f%DHT#B*+ zq=#!zc5=0FEqWFpB%UE(L807on!pidHPLgYO}XEgorrg;PB=8ipgQ5u5`&g_MQaRd zaU7Ao8XQMuuN21-s0PPTs1%38x_Yl3Fs-|Y4!C-;M-8g@n*v@1|s#GQ665=9@Rxy?u0YW0&WN+~=RXpPbVXXL4m7Aq=E6I0%{06TwRn=U9d8>exk> zD-Z%M3DNQ`bTLSEF=%NFyoHcAkD*CiXqljo*0E?o$GiDC4q}}|%*0WghLlK#npw?hecrM}Mw?`E(z5C8< z8&*b^!{>5?4aT89vdrgBgSc-x6JZD3F^l#*G(@OO*^1D%Eu7?HAy<3kTLqW9N{^#6vso zVQwY48q7)m{~xQ64RV7{E7Y=&T~?^05Ky`5oNQ8bLgFCPq9co^R09BVRS1OAmH;hU zC#q(N!gNqm!zU#%sv{r5mm-Uv8b-~a1F-;p^>)pnXfKge4s9?;;MFIr*fixPG}NBA z6_G5BEmeO6XXh(emkciB{7tA;iwC2^s^VzyU_h0@ae84ACMY`cIDEju=<`q|2QAEv zW_)W|i|9aknqdmS=#w73eW_csQ$8IhT^vY1^1;X3&J0{%*tcQq!gJpr3w?TJc~@5= zKV5sM{$3k>b#S$@CTkhIF*{v*u(F&$&Yq1naHxt8Mz2N%7aQ3(^VNRZahk1||7?Bl z*idzO_u)FhRj4cPzDO>YA>>lxAGaciEiX8Xzp1SVPv91};$OG3cC&8!v3{Jq^kH@8 UTIccK;hzT5*3#}uZuEx!0OwrBv;Y7A literal 0 HcmV?d00001 diff --git a/SampleApps/StoreApplication/Assets/StoreLogo.png b/SampleApps/StoreApplication/Assets/StoreLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..dcb672712c6823a0c91548ded70a8acb85536b4d GIT binary patch literal 429 zcmV;e0aE^nP)NtYJa1l)bQ5qwGXpZbs7%2oRMd4y35$s&66(fxhNg8W02!vSn zdlrL2h^Fx+3=$z;kK{0D#MyeJ8WRWZcLSf(PcQ_mLOhrmC}O-tX^0c>5`YvCUZVsc zG-6#78ubjJ5nA;OX&^K(q=i6ZNE3m?kTwE^AqxZoLskfB3|S&1F=UO9!cY$g2@Lgu z;9{sJ1P9|X2L`r1#Gs8R{E^$PRrMaC86q| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mouse + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SampleApps/StoreApplication/MainPage.xaml b/SampleApps/StoreApplication/MainPage.xaml new file mode 100644 index 00000000..e3f7bfe1 --- /dev/null +++ b/SampleApps/StoreApplication/MainPage.xaml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OpenStreetMap + OpenCycleMap + OCM Transport + OCM Landscape + MapQuest OSM + + + + + diff --git a/SampleApps/StoreApplication/MainPage.xaml.cs b/SampleApps/StoreApplication/MainPage.xaml.cs new file mode 100644 index 00000000..098b5929 --- /dev/null +++ b/SampleApps/StoreApplication/MainPage.xaml.cs @@ -0,0 +1,156 @@ +using MapControl; +using System; +using System.Collections.Generic; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 + +namespace StoreApplication +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class MainPage : Page + { + private SamplePoint movingPoint = new SamplePoint + { + Name = "Moving", + Location = new Location(53.5, 8.25) + }; + + public MainPage() + { + this.InitializeComponent(); + + ICollection polylines = (ICollection)Resources["Polylines"]; + polylines.Add( + new SamplePolyline + { + Locations = LocationCollection.Parse("53.5140,8.1451 53.5123,8.1506 53.5156,8.1623 53.5276,8.1757 53.5491,8.1852 53.5495,8.1877 53.5426,8.1993 53.5184,8.2219 53.5182,8.2386 53.5195,8.2387") + }); + polylines.Add( + new SamplePolyline + { + Locations = LocationCollection.Parse("53.5978,8.1212 53.6018,8.1494 53.5859,8.1554 53.5852,8.1531 53.5841,8.1539 53.5802,8.1392 53.5826,8.1309 53.5867,8.1317 53.5978,8.1212") + }); + + ICollection points = (ICollection)Resources["Points"]; + points.Add( + new SamplePoint + { + Name = "Steinbake Leitdamm", + Location = new Location(53.51217, 8.16603) + }); + points.Add( + new SamplePoint + { + Name = "Buhne 2", + Location = new Location(53.50926, 8.15815) + }); + points.Add( + new SamplePoint + { + Name = "Buhne 4", + Location = new Location(53.50468, 8.15343) + }); + points.Add( + new SamplePoint + { + Name = "Buhne 6", + Location = new Location(53.50092, 8.15267) + }); + points.Add( + new SamplePoint + { + Name = "Buhne 8", + Location = new Location(53.49871, 8.15321) + }); + points.Add( + new SamplePoint + { + Name = "Buhne 10", + Location = new Location(53.49350, 8.15563) + }); + points.Add(movingPoint); + + ICollection pushpins = (ICollection)Resources["Pushpins"]; + pushpins.Add( + new SamplePoint + { + Name = "WHV - Eckwarderhörne", + Location = new Location(53.5495, 8.1877) + }); + pushpins.Add( + new SamplePoint + { + Name = "JadeWeserPort", + Location = new Location(53.5914, 8.14) + }); + pushpins.Add( + new SamplePoint + { + Name = "Kurhaus Dangast", + Location = new Location(53.447, 8.1114) + }); + pushpins.Add( + new SamplePoint + { + Name = "Eckwarderhörne", + Location = new Location(53.5207, 8.2323) + }); + + DispatcherTimer timer = new DispatcherTimer(); + timer.Interval = TimeSpan.FromSeconds(0.1); + timer.Tick += MovePoint; + timer.Start(); + } + + private void MovePoint(object sender, object e) + { + movingPoint.Location = new Location(movingPoint.Location.Latitude + 0.001, movingPoint.Location.Longitude + 0.002); + + if (movingPoint.Location.Latitude > 54d) + { + movingPoint.Name = "Stopped"; + ((DispatcherTimer)sender).Stop(); + } + } + + /// + /// Invoked when this page is about to be displayed in a Frame. + /// + /// Event data that describes how this page was reached. The Parameter + /// property is typically used to configure the page. + protected override void OnNavigatedTo(NavigationEventArgs e) + { + } + + private void SeamarksClick(object sender, RoutedEventArgs e) + { + var checkBox = (CheckBox)sender; + var tileLayers = (TileLayerCollection)Resources["TileLayers"]; + var tileLayer = tileLayers["Seamarks"]; + + if ((bool)checkBox.IsChecked) + { + map.TileLayers.Add(tileLayer); + } + else + { + map.TileLayers.Remove(tileLayer); + } + } + + private void TileLayerSelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (map != null) + { + var comboBox = (ComboBox)sender; + var tileLayers = (TileLayerCollection)Resources["TileLayers"]; + map.TileLayer = tileLayers[(string)((ComboBoxItem)comboBox.SelectedItem).Content]; + } + } + } +} diff --git a/SampleApps/StoreApplication/Package.appxmanifest b/SampleApps/StoreApplication/Package.appxmanifest new file mode 100644 index 00000000..cf52ad48 --- /dev/null +++ b/SampleApps/StoreApplication/Package.appxmanifest @@ -0,0 +1,42 @@ + + + + + + + StoreApplication + Clemens + Assets\StoreLogo.png + + + + 6.2.1 + 6.2.1 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..967cee55 --- /dev/null +++ b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs @@ -0,0 +1,14 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("StoreApplication")] +[assembly: AssemblyDescription("XAML Map Control Sample Application for Windows Runtime")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Clemens Fischer")] +[assembly: AssemblyProduct("XAML Map Control")] +[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] \ No newline at end of file diff --git a/SampleApps/StoreApplication/SampleItems.cs b/SampleApps/StoreApplication/SampleItems.cs new file mode 100644 index 00000000..46b7231e --- /dev/null +++ b/SampleApps/StoreApplication/SampleItems.cs @@ -0,0 +1,51 @@ +using MapControl; +using System.Collections.ObjectModel; +using System.ComponentModel; + +namespace StoreApplication +{ + public class SamplePoint : INotifyPropertyChanged + { + private string name; + private Location location; + + public event PropertyChangedEventHandler PropertyChanged; + + public string Name + { + get { return name; } + set + { + name = value; + OnPropertyChanged("Name"); + } + } + + public Location Location + { + get { return location; } + set + { + location = value; + OnPropertyChanged("Location"); + } + } + + private void OnPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + public class SamplePolyline + { + public LocationCollection Locations { get; set; } + } + + public class SampleItemCollection : ObservableCollection + { + } +} diff --git a/SampleApps/StoreApplication/StoreApplication.csproj b/SampleApps/StoreApplication/StoreApplication.csproj new file mode 100644 index 00000000..55054fcd --- /dev/null +++ b/SampleApps/StoreApplication/StoreApplication.csproj @@ -0,0 +1,154 @@ + + + + + Debug + AnyCPU + {747A3F84-E11F-4EC8-9463-98BBB1E0D0A4} + AppContainerExe + Properties + StoreApplication + StoreApplication + en-US + 512 + {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + StoreApplication_TemporaryKey.pfx + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE;NETFX_CORE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE;NETFX_CORE + prompt + 4 + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE + true + ;2008 + pdbonly + ARM + false + prompt + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE + true + ;2008 + pdbonly + x64 + false + prompt + true + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE + true + ;2008 + none + x86 + false + prompt + true + + + + App.xaml + + + MainPage.xaml + + + + + + + Designer + + + + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + {63cefdf7-5170-43b6-86f8-5c4a383a1615} + MapControl.WinRT + + + + 11.0 + + + + \ No newline at end of file diff --git a/SampleApps/StoreApplication/StoreApplication.csproj.user b/SampleApps/StoreApplication/StoreApplication.csproj.user new file mode 100644 index 00000000..7b348652 --- /dev/null +++ b/SampleApps/StoreApplication/StoreApplication.csproj.user @@ -0,0 +1,6 @@ + + + + False + + \ No newline at end of file diff --git a/SampleApps/SurfaceApplication/App.config b/SampleApps/SurfaceApplication/App.config index e3656033..c5e1daef 100644 --- a/SampleApps/SurfaceApplication/App.config +++ b/SampleApps/SurfaceApplication/App.config @@ -1,3 +1,3 @@ - + diff --git a/SampleApps/SurfaceApplication/MainWindow.xaml b/SampleApps/SurfaceApplication/MainWindow.xaml index ae1e01fe..32affe34 100644 --- a/SampleApps/SurfaceApplication/MainWindow.xaml +++ b/SampleApps/SurfaceApplication/MainWindow.xaml @@ -2,10 +2,10 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="http://schemas.microsoft.com/surface/2008" - xmlns:m="clr-namespace:MapControl;assembly=MapControl" - Title="SurfaceApplication"> + xmlns:m="clr-namespace:MapControl;assembly=MapControl.WPF" + Title="SurfaceApplication" WindowStyle="None" WindowState="Maximized"> - diff --git a/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs b/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs index b74b271b..174022a9 100644 --- a/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs @@ -1,64 +1,16 @@ using System.Reflection; -using System.Runtime.CompilerServices; -using System.Resources; -using System.Globalization; -using System.Windows; using System.Runtime.InteropServices; +using System.Windows; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. [assembly: AssemblyTitle("SurfaceApplication")] -[assembly: AssemblyDescription("WPF Map Control Sample Surface Application")] +[assembly: AssemblyDescription("XAML Map Control Sample Application for PixelSense (Surface 2)")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Clemens Fischer")] -[assembly: AssemblyProduct("WPF Map Control")] +[assembly: AssemblyProduct("XAML Map Control")] [assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -// Specifies the location in which theme dictionaries are stored for types in an assembly. -[assembly: ThemeInfo( - // Specifies the location of system theme-specific resource dictionaries for this project. - // The default setting in this project is "None" since this default project does not - // include these user-defined theme files: - // Themes\Aero.NormalColor.xaml - // Themes\Classic.xaml - // Themes\Luna.Homestead.xaml - // Themes\Luna.Metallic.xaml - // Themes\Luna.NormalColor.xaml - // Themes\Royale.NormalColor.xaml - ResourceDictionaryLocation.None, - - // Specifies the location of the system non-theme specific resource dictionary: - // Themes\generic.xaml - ResourceDictionaryLocation.SourceAssembly)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] +[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] diff --git a/SampleApps/SurfaceApplication/Properties/Resources.Designer.cs b/SampleApps/SurfaceApplication/Properties/Resources.Designer.cs index df792a36..e2775e3b 100644 --- a/SampleApps/SurfaceApplication/Properties/Resources.Designer.cs +++ b/SampleApps/SurfaceApplication/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.225 +// Runtime Version:4.0.30319.18010 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/SampleApps/SurfaceApplication/Properties/Settings.Designer.cs b/SampleApps/SurfaceApplication/Properties/Settings.Designer.cs index 3bdb505e..84e4668d 100644 --- a/SampleApps/SurfaceApplication/Properties/Settings.Designer.cs +++ b/SampleApps/SurfaceApplication/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.225 +// Runtime Version:4.0.30319.18010 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ namespace SurfaceApplication.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/SampleApps/SurfaceApplication/SurfaceApplication.csproj b/SampleApps/SurfaceApplication/SurfaceApplication.csproj index 9d66a08f..adf4a62e 100644 --- a/SampleApps/SurfaceApplication/SurfaceApplication.csproj +++ b/SampleApps/SurfaceApplication/SurfaceApplication.csproj @@ -10,7 +10,7 @@ Properties SurfaceApplication SurfaceApplication - v4.0 + v4.5 512 @@ -25,6 +25,7 @@ DEBUG;TRACE prompt 4 + false none @@ -33,6 +34,7 @@ TRACE prompt 4 + false @@ -96,13 +98,13 @@ - - {06481252-2310-414A-B9FC-D5739FDF6BD3} - MapControl - + - + + {226f3575-b683-446d-a2f0-181291dc8787} + MapControl.WPF + + - - - - + + + + - + TileLayer="{Binding Source={StaticResource TileLayersView}, Path=CurrentItem}" + MouseLeftButtonDown="MapMouseLeftButtonDown" MouseRightButtonDown="MapMouseRightButtonDown" + MouseMove="MapMouseMove" MouseLeave="MapMouseLeave" + ManipulationInertiaStarting="MapManipulationInertiaStarting"> + + + + + IsSynchronizedWithCurrentItem="True" + SelectionMode="Extended"/> + - + + - + - + + + Text="{Binding TileLayer.Description, ElementName=map}"/> - + - - + - - + diff --git a/SampleApps/SampleApplication/MainWindow.xaml.cs b/SampleApps/WpfApplication/MainWindow.xaml.cs similarity index 87% rename from SampleApps/SampleApplication/MainWindow.xaml.cs rename to SampleApps/WpfApplication/MainWindow.xaml.cs index c3086992..e36a6ffc 100644 --- a/SampleApps/SampleApplication/MainWindow.xaml.cs +++ b/SampleApps/WpfApplication/MainWindow.xaml.cs @@ -1,13 +1,13 @@ -using System; +using Caching; +using MapControl; +using System; using System.Collections.Generic; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Threading; -using Caching; -using MapControl; -namespace SampleApplication +namespace WpfApplication { public partial class MainWindow : Window { @@ -127,9 +127,21 @@ namespace SampleApplication } } - private void MapManipulationInertiaStarting(object sender, ManipulationInertiaStartingEventArgs e) + private void MapMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { - e.TranslationBehavior.DesiredDeceleration = 0.001; + if (e.ClickCount == 2) + { + map.ZoomMap(e.GetPosition(map), Math.Floor(map.ZoomLevel + 1.5)); + //map.TargetCenter = map.ViewportPointToLocation(e.GetPosition(map)); + } + } + + private void MapMouseRightButtonDown(object sender, MouseButtonEventArgs e) + { + if (e.ClickCount == 2) + { + map.ZoomMap(e.GetPosition(map), Math.Ceiling(map.ZoomLevel - 1.5)); + } } private void MapMouseLeave(object sender, MouseEventArgs e) @@ -142,10 +154,15 @@ namespace SampleApplication mouseLocation.Text = map.ViewportPointToLocation(e.GetPosition(map)).ToString(); } + private void MapManipulationInertiaStarting(object sender, ManipulationInertiaStartingEventArgs e) + { + e.TranslationBehavior.DesiredDeceleration = 0.001; + } + private void SeamarksClick(object sender, RoutedEventArgs e) { - TileLayer seamarks = (TileLayer)Resources["SeamarksTileLayer"]; - CheckBox checkBox = (CheckBox)sender; + var seamarks = (TileLayer)Resources["SeamarksTileLayer"]; + var checkBox = (CheckBox)sender; if ((bool)checkBox.IsChecked) { diff --git a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..cfe385de --- /dev/null +++ b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs @@ -0,0 +1,16 @@ +using System.Reflection; +using System.Runtime.InteropServices; +using System.Windows; + +[assembly: AssemblyTitle("WpfApplication")] +[assembly: AssemblyDescription("XAML Map Control Sample Application for WPF")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Clemens Fischer")] +[assembly: AssemblyProduct("XAML Map Control")] +[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] +[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] diff --git a/SampleApps/SampleApplication/Properties/Settings.Designer.cs b/SampleApps/WpfApplication/Properties/Settings.Designer.cs similarity index 92% rename from SampleApps/SampleApplication/Properties/Settings.Designer.cs rename to SampleApps/WpfApplication/Properties/Settings.Designer.cs index d130c145..7ae79a04 100644 --- a/SampleApps/SampleApplication/Properties/Settings.Designer.cs +++ b/SampleApps/WpfApplication/Properties/Settings.Designer.cs @@ -1,18 +1,18 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.269 +// Runtime Version:4.0.30319.18010 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace SampleApplication.Properties { +namespace WpfApplication.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/SampleApps/SampleApplication/Properties/Settings.settings b/SampleApps/WpfApplication/Properties/Settings.settings similarity index 100% rename from SampleApps/SampleApplication/Properties/Settings.settings rename to SampleApps/WpfApplication/Properties/Settings.settings diff --git a/SampleApps/SampleApplication/SampleItems.cs b/SampleApps/WpfApplication/SampleItems.cs similarity index 79% rename from SampleApps/SampleApplication/SampleItems.cs rename to SampleApps/WpfApplication/SampleItems.cs index ab445b3b..69fb0050 100644 --- a/SampleApps/SampleApplication/SampleItems.cs +++ b/SampleApps/WpfApplication/SampleItems.cs @@ -1,10 +1,10 @@ -using System.Collections.ObjectModel; -using MapControl; +using MapControl; +using System.Collections.ObjectModel; using System.ComponentModel; -namespace SampleApplication +namespace WpfApplication { - class SamplePoint : INotifyPropertyChanged + public class SamplePoint : INotifyPropertyChanged { private string name; private Location location; @@ -40,12 +40,12 @@ namespace SampleApplication } } - class SamplePolyline + public class SamplePolyline { public LocationCollection Locations { get; set; } } - class SampleItemCollection : ObservableCollection + public class SampleItemCollection : ObservableCollection { } } diff --git a/SampleApps/SampleApplication/SampleApplication.csproj b/SampleApps/WpfApplication/WpfApplication.csproj similarity index 90% rename from SampleApps/SampleApplication/SampleApplication.csproj rename to SampleApps/WpfApplication/WpfApplication.csproj index a9b4826e..f7c44cca 100644 --- a/SampleApps/SampleApplication/SampleApplication.csproj +++ b/SampleApps/WpfApplication/WpfApplication.csproj @@ -8,9 +8,9 @@ {CCBCDAE5-E68F-43A8-930A-0749E476D29D} WinExe Properties - SampleApplication - SampleApplication - v4.0 + WpfApplication + WpfApplication + v4.5 512 @@ -27,6 +27,7 @@ prompt 4 false + false x86 @@ -37,6 +38,7 @@ prompt 4 false + false @@ -60,7 +62,7 @@ Settings.settings - + MSBuild:Compile Designer @@ -89,9 +91,9 @@ {86470440-FEE2-4120-AF5A-3762FB9C536F} ImageFileCache - - {06481252-2310-414A-B9FC-D5739FDF6BD3} - MapControl + + {226f3575-b683-446d-a2f0-181291dc8787} + MapControl.WPF