Version 2.5.0:

- moved tile rect calculation from MapBase to TileLayer
- added TileLayer.ZoomLevelOffset property
- Windows Universal sample application in solution MapControl VS2015
This commit is contained in:
ClemensF 2015-08-09 20:04:44 +02:00
parent 36a8600faf
commit 98cdc95c5d
80 changed files with 16033 additions and 456 deletions

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -62,6 +62,7 @@ namespace MapControl.Caching
{
}
//Debug.WriteLine("Loaded cached image {0}", file.Path);
return cacheItem;
}

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

265
MapControl VS2015.sln Normal file
View file

@ -0,0 +1,265 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileDbCache.WinRT", "Caching\FileDbCache.WinRT\FileDbCache.WinRT.csproj", "{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileDbCache.WPF", "Caching\FileDbCache.WPF\FileDbCache.WPF.csproj", "{EF44F661-B98A-4676-927F-85D138F82300}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageFileCache.WinRT", "Caching\ImageFileCache.WinRT\ImageFileCache.WinRT.csproj", "{F789647E-96F7-43E3-A895-FA3FE8D01260}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageFileCache.WPF", "Caching\ImageFileCache.WPF\ImageFileCache.WPF.csproj", "{86470440-FEE2-4120-AF5A-3762FB9C536F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapControl.Silverlight", "MapControl\MapControl.Silverlight.csproj", "{EB133B78-DEFF-416A-8F0C-89E54D766576}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapControl.WinRT", "MapControl\WinRT\MapControl.WinRT.csproj", "{63CEFDF7-5170-43B6-86F8-5C4A383A1615}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapControl.WPF", "MapControl\MapControl.WPF.csproj", "{226F3575-B683-446D-A2F0-181291DC8787}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhoneApplication", "SampleApps\PhoneApplication\PhoneApplication.csproj", "{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightApplication", "SampleApps\SilverlightApplication\SilverlightApplication.csproj", "{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightApplication.Web", "SampleApps\SilverlightApplication.Web\SilverlightApplication.Web.csproj", "{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApplication", "SampleApps\WpfApplication\WpfApplication.csproj", "{9949326E-9261-4F95-89B1-151F60498951}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SampleApps", "SampleApps", "{100879CC-8910-459E-856E-253D629E45DE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching", "Caching", "{AE8A7E02-0F7D-41B0-AB23-15394150ED17}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalApp", "SampleApps\UniversalApp\UniversalApp.csproj", "{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|ARM.ActiveCfg = Debug|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|ARM.Build.0 = Debug|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|x64.ActiveCfg = Debug|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|x64.Build.0 = Debug|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|x86.ActiveCfg = Debug|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Debug|x86.Build.0 = Debug|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|Any CPU.Build.0 = Release|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|ARM.ActiveCfg = Release|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|ARM.Build.0 = Release|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|x64.ActiveCfg = Release|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|x64.Build.0 = Release|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|x86.ActiveCfg = Release|Any CPU
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}.Release|x86.Build.0 = Release|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|ARM.ActiveCfg = Debug|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|ARM.Build.0 = Debug|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|x64.ActiveCfg = Debug|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|x64.Build.0 = Debug|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|x86.ActiveCfg = Debug|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|x86.Build.0 = Debug|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Release|Any CPU.Build.0 = Release|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Release|ARM.ActiveCfg = Release|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Release|ARM.Build.0 = Release|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Release|x64.ActiveCfg = Release|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Release|x64.Build.0 = Release|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Release|x86.ActiveCfg = Release|Any CPU
{EF44F661-B98A-4676-927F-85D138F82300}.Release|x86.Build.0 = Release|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|ARM.ActiveCfg = Debug|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|ARM.Build.0 = Debug|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|x64.ActiveCfg = Debug|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|x64.Build.0 = Debug|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|x86.ActiveCfg = Debug|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Debug|x86.Build.0 = Debug|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|Any CPU.Build.0 = Release|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|ARM.ActiveCfg = Release|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|ARM.Build.0 = Release|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|x64.ActiveCfg = Release|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|x64.Build.0 = Release|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|x86.ActiveCfg = Release|Any CPU
{F789647E-96F7-43E3-A895-FA3FE8D01260}.Release|x86.Build.0 = Release|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|ARM.ActiveCfg = Debug|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|ARM.Build.0 = Debug|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x64.ActiveCfg = Debug|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x64.Build.0 = Debug|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x86.ActiveCfg = Debug|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x86.Build.0 = Debug|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|Any CPU.Build.0 = Release|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|ARM.ActiveCfg = Release|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|ARM.Build.0 = Release|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x64.ActiveCfg = Release|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x64.Build.0 = Release|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x86.ActiveCfg = Release|Any CPU
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x86.Build.0 = Release|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|ARM.ActiveCfg = Debug|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|ARM.Build.0 = Debug|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x64.ActiveCfg = Debug|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x64.Build.0 = Debug|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x86.ActiveCfg = Debug|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x86.Build.0 = Debug|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|Any CPU.Build.0 = Release|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|ARM.ActiveCfg = Release|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|ARM.Build.0 = Release|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x64.ActiveCfg = Release|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x64.Build.0 = Release|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x86.ActiveCfg = Release|Any CPU
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x86.Build.0 = Release|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|ARM.ActiveCfg = Debug|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|ARM.Build.0 = Debug|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x64.ActiveCfg = Debug|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x64.Build.0 = Debug|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x86.ActiveCfg = Debug|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x86.Build.0 = Debug|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|Any CPU.Build.0 = Release|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|ARM.ActiveCfg = Release|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|ARM.Build.0 = Release|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x64.ActiveCfg = Release|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x64.Build.0 = Release|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x86.ActiveCfg = Release|Any CPU
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x86.Build.0 = Release|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|Any CPU.Build.0 = Debug|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|ARM.ActiveCfg = Debug|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|ARM.Build.0 = Debug|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|x64.ActiveCfg = Debug|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|x64.Build.0 = Debug|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|x86.ActiveCfg = Debug|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|x86.Build.0 = Debug|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Release|Any CPU.ActiveCfg = Release|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Release|Any CPU.Build.0 = Release|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Release|ARM.ActiveCfg = Release|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Release|ARM.Build.0 = Release|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Release|x64.ActiveCfg = Release|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Release|x64.Build.0 = Release|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Release|x86.ActiveCfg = Release|Any CPU
{226F3575-B683-446D-A2F0-181291DC8787}.Release|x86.Build.0 = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|ARM.ActiveCfg = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|ARM.Build.0 = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|ARM.Deploy.0 = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x64.ActiveCfg = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x64.Build.0 = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x64.Deploy.0 = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x86.ActiveCfg = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x86.Build.0 = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Debug|x86.Deploy.0 = Debug|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|Any CPU.Build.0 = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|Any CPU.Deploy.0 = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|ARM.ActiveCfg = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|ARM.Build.0 = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|ARM.Deploy.0 = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x64.ActiveCfg = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x64.Build.0 = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x64.Deploy.0 = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x86.ActiveCfg = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x86.Build.0 = Release|Any CPU
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9}.Release|x86.Deploy.0 = Release|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|ARM.ActiveCfg = Debug|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|ARM.Build.0 = Debug|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x64.ActiveCfg = Debug|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x64.Build.0 = Debug|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x86.ActiveCfg = Debug|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x86.Build.0 = Debug|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|Any CPU.Build.0 = Release|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|ARM.ActiveCfg = Release|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|ARM.Build.0 = Release|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x64.ActiveCfg = Release|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x64.Build.0 = Release|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x86.ActiveCfg = Release|Any CPU
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x86.Build.0 = Release|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|ARM.ActiveCfg = Debug|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|ARM.Build.0 = Debug|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x64.ActiveCfg = Debug|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x64.Build.0 = Debug|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x86.ActiveCfg = Debug|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x86.Build.0 = Debug|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|Any CPU.Build.0 = Release|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|ARM.ActiveCfg = Release|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|ARM.Build.0 = Release|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x64.ActiveCfg = Release|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x64.Build.0 = Release|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x86.ActiveCfg = Release|Any CPU
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x86.Build.0 = Release|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Debug|ARM.ActiveCfg = Debug|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Debug|ARM.Build.0 = Debug|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Debug|x64.ActiveCfg = Debug|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Debug|x64.Build.0 = Debug|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Debug|x86.ActiveCfg = Debug|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Debug|x86.Build.0 = Debug|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Release|Any CPU.Build.0 = Release|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Release|ARM.ActiveCfg = Release|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Release|ARM.Build.0 = Release|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Release|x64.ActiveCfg = Release|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Release|x64.Build.0 = Release|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Release|x86.ActiveCfg = Release|Any CPU
{9949326E-9261-4F95-89B1-151F60498951}.Release|x86.Build.0 = Release|Any CPU
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|Any CPU.ActiveCfg = Debug|ARM
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|ARM.ActiveCfg = Debug|ARM
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|ARM.Build.0 = Debug|ARM
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|ARM.Deploy.0 = Debug|ARM
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x64.ActiveCfg = Debug|x64
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x64.Build.0 = Debug|x64
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x64.Deploy.0 = Debug|x64
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x86.ActiveCfg = Debug|x86
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x86.Build.0 = Debug|x86
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Debug|x86.Deploy.0 = Debug|x86
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|Any CPU.ActiveCfg = Release|x86
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|ARM.ActiveCfg = Release|ARM
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|ARM.Build.0 = Release|ARM
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|ARM.Deploy.0 = Release|ARM
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x64.ActiveCfg = Release|x64
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x64.Build.0 = Release|x64
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x64.Deploy.0 = Release|x64
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x86.ActiveCfg = Release|x86
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x86.Build.0 = Release|x86
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{C7BF2B18-CC74-430B-BCB2-600304EFA3D8} = {AE8A7E02-0F7D-41B0-AB23-15394150ED17}
{EF44F661-B98A-4676-927F-85D138F82300} = {AE8A7E02-0F7D-41B0-AB23-15394150ED17}
{F789647E-96F7-43E3-A895-FA3FE8D01260} = {AE8A7E02-0F7D-41B0-AB23-15394150ED17}
{86470440-FEE2-4120-AF5A-3762FB9C536F} = {AE8A7E02-0F7D-41B0-AB23-15394150ED17}
{8D0A57DF-FABF-4AEE-8768-9C18B2B43CA9} = {100879CC-8910-459E-856E-253D629E45DE}
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21} = {100879CC-8910-459E-856E-253D629E45DE}
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1} = {100879CC-8910-459E-856E-253D629E45DE}
{9949326E-9261-4F95-89B1-151F60498951} = {100879CC-8910-459E-856E-253D629E45DE}
{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1} = {100879CC-8910-459E-856E-253D629E45DE}
EndGlobalSection
EndGlobal

View file

@ -8,7 +8,7 @@ using System.Diagnostics;
using System.Globalization;
using System.Net;
using System.Xml;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media.Imaging;
#else

View file

@ -31,9 +31,9 @@ namespace MapControl
quadkey[z] = (char)('0' + 2 * (y % 2) + (x % 2));
}
return new Uri(UriFormat.
Replace("{subdomain}", subdomain).
Replace("{quadkey}", new string(quadkey)));
return new Uri(UriFormat
.Replace("{subdomain}", subdomain)
.Replace("{quadkey}", new string(quadkey)));
}
}
}

View file

@ -5,7 +5,7 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Documents;
@ -45,7 +45,7 @@ namespace MapControl
link.Inlines.Add(new Run { Text = match.Groups[1].Value });
#if SILVERLIGHT
link.TargetName = "_blank";
#elif !WINDOWS_RUNTIME
#elif !NETFX_CORE
link.ToolTip = uri.ToString();
link.RequestNavigate += (s, e) => System.Diagnostics.Process.Start(e.Uri.ToString());
#endif
@ -86,7 +86,7 @@ namespace MapControl
{
inlines = ((Paragraph)obj).Inlines;
}
#if WINDOWS_RUNTIME || SILVERLIGHT
#if NETFX_CORE || SILVERLIGHT
else if (obj is RichTextBlock)
{
var paragraph = new Paragraph();

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Imaging;
#else

View file

@ -3,16 +3,16 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;
#else
using System.Windows;
using System.Windows.Media;
using System.Windows.Controls;
using System.Windows.Media;
#endif
namespace MapControl
@ -61,43 +61,21 @@ namespace MapControl
private void OnRenderSizeChanged(object sender, SizeChangedEventArgs e)
{
((RectangleGeometry)Clip).Rect = new Rect(new Point(), e.NewSize);
ResetTransformOrigin();
UpdateTransform();
}
private void SetViewportTransform(Point mapOrigin)
private void SetViewportTransform(Location origin)
{
viewportTransform.Matrix = Matrix.Identity
.Translate(-mapOrigin.X, -mapOrigin.Y)
MapOrigin = mapTransform.Transform(origin);
ViewportScale = Math.Pow(2d, ZoomLevel) * TileSource.TileSize / 360d;
viewportTransform.Matrix =
new Matrix(1d, 0d, 0d, 1d, -MapOrigin.X, -MapOrigin.Y)
.Scale(ViewportScale, -ViewportScale)
.Rotate(Heading)
.Translate(viewportOrigin.X, viewportOrigin.Y);
}
private void SetTileLayerTransform()
{
var scale = Math.Pow(2d, ZoomLevel - TileZoomLevel);
tileLayerTransform.Matrix = Matrix.Identity
.Translate(TileGrid.X * TileSource.TileSize, TileGrid.Y * TileSource.TileSize)
.Scale(scale, scale)
.Translate(tileLayerOffset.X, tileLayerOffset.Y)
.RotateAt(Heading, viewportOrigin.X, viewportOrigin.Y); ;
}
private void SetTransformMatrixes()
{
scaleTransform.Matrix = Matrix.Identity.Scale(CenterScale, CenterScale);
rotateTransform.Matrix = Matrix.Identity.Rotate(Heading);
scaleRotateTransform.Matrix = scaleTransform.Matrix.Multiply(rotateTransform.Matrix);
}
private Matrix GetTileIndexMatrix(double scale)
{
return viewportTransform.Matrix
.Invert() // view to map coordinates
.Translate(180d, -180d)
.Scale(scale, -scale); // map coordinates to tile indices
.Translate(ViewportOrigin.X, ViewportOrigin.Y);
}
}
}

View file

@ -61,54 +61,22 @@ namespace MapControl
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
base.OnRenderSizeChanged(sizeInfo);
ResetTransformOrigin();
UpdateTransform();
}
private void SetViewportTransform(Point mapOrigin)
private void SetViewportTransform(Location origin)
{
var transform = Matrix.Identity;
transform.Translate(-mapOrigin.X, -mapOrigin.Y);
MapOrigin = mapTransform.Transform(origin);
ViewportScale = Math.Pow(2d, ZoomLevel) * TileSource.TileSize / 360d;
var transform = new Matrix(1d, 0d, 0d, 1d, -MapOrigin.X, -MapOrigin.Y);
transform.Scale(ViewportScale, -ViewportScale);
transform.Rotate(Heading);
transform.Translate(viewportOrigin.X, viewportOrigin.Y);
transform.Translate(ViewportOrigin.X, ViewportOrigin.Y);
viewportTransform.Matrix = transform;
}
private void SetTileLayerTransform()
{
var scale = Math.Pow(2d, ZoomLevel - TileZoomLevel);
var transform = Matrix.Identity;
transform.Translate(TileGrid.X * TileSource.TileSize, TileGrid.Y * TileSource.TileSize);
transform.Scale(scale, scale);
transform.Translate(tileLayerOffset.X, tileLayerOffset.Y);
transform.RotateAt(Heading, viewportOrigin.X, viewportOrigin.Y);
tileLayerTransform.Matrix = transform;
}
private void SetTransformMatrixes()
{
var rotateMatrix = Matrix.Identity;
rotateMatrix.Rotate(Heading);
rotateTransform.Matrix = rotateMatrix;
var scaleMatrix = Matrix.Identity;
scaleMatrix.Scale(CenterScale, CenterScale);
scaleTransform.Matrix = scaleMatrix;
scaleRotateTransform.Matrix = scaleMatrix * rotateMatrix;
}
private Matrix GetTileIndexMatrix(double scale)
{
var transform = viewportTransform.Matrix;
transform.Invert(); // view to map coordinates
transform.Translate(180d, -180d);
transform.Scale(scale, -scale); // map coordinates to tile indices
return transform;
}
}
}

View file

@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
@ -16,24 +16,20 @@ using Windows.UI.Xaml.Media.Animation;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Threading;
#endif
namespace MapControl
{
/// <summary>
/// The map control. Draws map content provided by the TileLayers or the TileLayer property.
/// The visible map area is defined by the Center and ZoomLevel properties. The map can be rotated
/// by an angle that is given by the Heading property.
/// MapBase is a MapPanel and hence can contain map overlays like other MapPanels or MapItemsControls.
/// The map control. Renders map content provided by the TileLayer or TileLayers property.
/// The visible map area is defined by the Center and ZoomLevel properties.
/// The map can be rotated by an angle that is given by the Heading property.
/// MapBase can contain map overlay child elements like other MapPanels or MapItemsControls.
/// </summary>
public partial class MapBase : MapPanel
{
private const double MaximumZoomLevel = 22d;
public static double ZoomLevelSwitchDelta = 0d;
public static bool UpdateTilesWhileViewportChanging = true;
public static TimeSpan TileUpdateInterval = TimeSpan.FromSeconds(0.5);
public static TimeSpan AnimationDuration = TimeSpan.FromSeconds(0.3);
public static EasingFunctionBase AnimationEasingFunction = new QuadraticEase { EasingMode = EasingMode.EaseOut };
@ -50,7 +46,7 @@ namespace MapControl
(o, e) => ((MapBase)o).MinZoomLevelPropertyChanged((double)e.NewValue)));
public static readonly DependencyProperty MaxZoomLevelProperty = DependencyProperty.Register(
"MaxZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(18d,
"MaxZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(19d,
(o, e) => ((MapBase)o).MaxZoomLevelPropertyChanged((double)e.NewValue)));
internal static readonly DependencyProperty CenterPointProperty = DependencyProperty.Register(
@ -58,46 +54,40 @@ namespace MapControl
(o, e) => ((MapBase)o).CenterPointPropertyChanged((Point)e.NewValue)));
private readonly PanelBase tileLayerPanel = new PanelBase();
private readonly DispatcherTimer tileUpdateTimer = new DispatcherTimer { Interval = TileUpdateInterval };
private readonly MapTransform mapTransform = new MercatorTransform();
private readonly MatrixTransform viewportTransform = new MatrixTransform();
private readonly MatrixTransform tileLayerTransform = new MatrixTransform();
private readonly MatrixTransform scaleTransform = new MatrixTransform();
private readonly MatrixTransform rotateTransform = new MatrixTransform();
private readonly MatrixTransform scaleRotateTransform = new MatrixTransform();
private readonly ScaleTransform scaleTransform = new ScaleTransform();
private readonly RotateTransform rotateTransform = new RotateTransform();
private readonly TransformGroup scaleRotateTransform = new TransformGroup();
private Location transformOrigin;
private Point viewportOrigin;
private Point tileLayerOffset;
private PointAnimation centerAnimation;
private DoubleAnimation zoomLevelAnimation;
private DoubleAnimation headingAnimation;
private bool internalPropertyChange;
internal Point MapOrigin { get; private set; }
internal Point ViewportOrigin { get; private set; }
public MapBase()
{
Initialize();
scaleRotateTransform.Children.Add(scaleTransform);
scaleRotateTransform.Children.Add(rotateTransform);
Children.Add(tileLayerPanel);
TileLayers = new ObservableCollection<TileLayer>();
tileUpdateTimer.Tick += UpdateTiles;
Loaded += MapLoaded;
Initialize();
}
partial void Initialize();
partial void RemoveAnimation(DependencyProperty property);
partial void Initialize(); // Windows Runtime and Silverlight only
partial void RemoveAnimation(DependencyProperty property); // WPF only
/// <summary>
/// Raised when the current viewport has changed.
/// </summary>
public event EventHandler ViewportChanged;
/// <summary>
/// Raised when the TileZoomLevel or TileGrid properties have changed.
/// </summary>
public event EventHandler TileGridChanged;
/// <summary>
/// Gets or sets the map foreground Brush.
/// </summary>
@ -118,9 +108,8 @@ namespace MapControl
/// <summary>
/// Gets or sets optional multiple TileLayers that are used simultaneously.
/// The first element in the collection is equal to the value of the TileLayer property.
/// The additional TileLayers usually have transparent backgrounds and their IsOverlay
/// property is set to true.
/// The first element in the collection is equal to the value of the TileLayer
/// property. The additional TileLayers usually have transparent backgrounds.
/// </summary>
public IList<TileLayer> TileLayers
{
@ -185,7 +174,7 @@ namespace MapControl
}
/// <summary>
/// Gets or sets the map heading, or clockwise rotation angle in degrees.
/// Gets or sets the map heading, i.e. a clockwise rotation angle in degrees.
/// </summary>
public double Heading
{
@ -211,25 +200,17 @@ namespace MapControl
}
/// <summary>
/// Gets the transformation from cartesian map coordinates to viewport coordinates.
/// Gets the transformation from cartesian map coordinates to viewport coordinates (i.e. pixels).
/// </summary>
public Transform ViewportTransform
public MatrixTransform ViewportTransform
{
get { return viewportTransform; }
}
/// <summary>
/// Gets the RenderTransform to be used by TileLayers, with origin at TileGrid.X and TileGrid.Y.
/// Gets the scaling transformation from meters to viewport coordinate units at the Center location.
/// </summary>
public Transform TileLayerTransform
{
get { return tileLayerTransform; }
}
/// <summary>
/// Gets the scaling transformation from meters to viewport coordinate units (pixels) at the Center location.
/// </summary>
public Transform ScaleTransform
public ScaleTransform ScaleTransform
{
get { return scaleTransform; }
}
@ -237,7 +218,7 @@ namespace MapControl
/// <summary>
/// Gets the transformation that rotates by the value of the Heading property.
/// </summary>
public Transform RotateTransform
public RotateTransform RotateTransform
{
get { return rotateTransform; }
}
@ -245,7 +226,7 @@ namespace MapControl
/// <summary>
/// Gets the combination of ScaleTransform and RotateTransform
/// </summary>
public Transform ScaleRotateTransform
public TransformGroup ScaleRotateTransform
{
get { return scaleRotateTransform; }
}
@ -256,26 +237,17 @@ namespace MapControl
public double ViewportScale { get; private set; }
/// <summary>
/// Gets the scaling factor from meters to viewport coordinate units (pixels) at the Center location.
/// Gets the scaling factor from meters to viewport coordinate units at the Center location.
/// </summary>
public double CenterScale { get; private set; }
/// <summary>
/// Gets the zoom level to be used by TileLayers.
/// </summary>
public int TileZoomLevel { get; private set; }
/// <summary>
/// Gets the tile grid to be used by TileLayers.
/// </summary>
public Int32Rect TileGrid { get; private set; }
/// <summary>
/// Gets the map scale at the specified location as viewport coordinate units (pixels) per meter.
/// Gets the map scale at the specified location as viewport coordinate units per meter.
/// </summary>
public double GetMapScale(Location location)
{
return mapTransform.RelativeScale(location) * Math.Pow(2d, ZoomLevel) * TileSource.TileSize / (TileSource.MetersPerDegree * 360d);
return mapTransform.RelativeScale(location) *
Math.Pow(2d, ZoomLevel) * TileSource.TileSize / (TileSource.MetersPerDegree * 360d);
}
/// <summary>
@ -296,32 +268,33 @@ namespace MapControl
/// <summary>
/// Sets a temporary origin location in geographic coordinates for scaling and rotation transformations.
/// This origin location is automatically removed when the Center property is set by application code.
/// This origin location is automatically reset when the Center property is set by application code.
/// </summary>
public void SetTransformOrigin(Location origin)
{
transformOrigin = origin;
viewportOrigin = LocationToViewportPoint(origin);
ViewportOrigin = LocationToViewportPoint(origin);
}
/// <summary>
/// Sets a temporary origin point in viewport coordinates for scaling and rotation transformations.
/// This origin point is automatically removed when the Center property is set by application code.
/// This origin point is automatically reset when the Center property is set by application code.
/// </summary>
public void SetTransformOrigin(Point origin)
{
viewportOrigin.X = Math.Min(Math.Max(origin.X, 0d), RenderSize.Width);
viewportOrigin.Y = Math.Min(Math.Max(origin.Y, 0d), RenderSize.Height);
transformOrigin = ViewportPointToLocation(viewportOrigin);
ViewportOrigin = new Point(
Math.Min(Math.Max(origin.X, 0d), RenderSize.Width),
Math.Min(Math.Max(origin.Y, 0d), RenderSize.Height));
transformOrigin = ViewportPointToLocation(ViewportOrigin);
}
/// <summary>
/// Removes the temporary transform origin point set by SetTransformOrigin.
/// Resets the temporary transform origin point set by SetTransformOrigin.
/// </summary>
public void ResetTransformOrigin()
{
transformOrigin = null;
viewportOrigin = new Point(RenderSize.Width / 2d, RenderSize.Height / 2d);
ViewportOrigin = new Point(RenderSize.Width / 2d, RenderSize.Height / 2d);
}
/// <summary>
@ -336,7 +309,7 @@ namespace MapControl
if (translation.X != 0d || translation.Y != 0d)
{
Center = ViewportPointToLocation(new Point(viewportOrigin.X - translation.X, viewportOrigin.Y - translation.Y));
Center = ViewportPointToLocation(new Point(ViewportOrigin.X - translation.X, ViewportOrigin.Y - translation.Y));
}
}
@ -349,8 +322,7 @@ namespace MapControl
{
SetTransformOrigin(origin);
viewportOrigin.X += translation.X;
viewportOrigin.Y += translation.Y;
ViewportOrigin = new Point(ViewportOrigin.X + translation.X, ViewportOrigin.Y + translation.Y);
if (rotation != 0d)
{
@ -403,28 +375,6 @@ namespace MapControl
}
}
protected override void OnViewportChanged()
{
base.OnViewportChanged();
var viewportChanged = ViewportChanged;
if (viewportChanged != null)
{
viewportChanged(this, EventArgs.Empty);
}
}
private void MapLoaded(object sender, RoutedEventArgs e)
{
Loaded -= MapLoaded;
if (tileLayerPanel.Children.Count == 0 && !Children.OfType<TileLayer>().Any())
{
TileLayer = TileLayer.Default;
}
}
private void TileLayerPropertyChanged(TileLayer tileLayer)
{
if (tileLayer != null)
@ -849,74 +799,23 @@ namespace MapControl
}
}
CenterScale = ViewportScale * mapTransform.RelativeScale(center) / TileSource.MetersPerDegree; // Pixels per meter at center latitude
CenterScale = ViewportScale * mapTransform.RelativeScale(center) / TileSource.MetersPerDegree; // pixels per meter at center latitude
scaleTransform.ScaleX = CenterScale;
scaleTransform.ScaleY = CenterScale;
rotateTransform.Angle = Heading;
SetTransformMatrixes();
OnViewportChanged();
}
private void SetViewportTransform(Location origin)
protected override void OnViewportChanged()
{
var oldMapOriginX = (viewportOrigin.X - tileLayerOffset.X) / ViewportScale - 180d;
var mapOrigin = mapTransform.Transform(origin);
base.OnViewportChanged();
ViewportScale = Math.Pow(2d, ZoomLevel) * TileSource.TileSize / 360d;
SetViewportTransform(mapOrigin);
var viewportChanged = ViewportChanged;
tileLayerOffset.X = viewportOrigin.X - (180d + mapOrigin.X) * ViewportScale;
tileLayerOffset.Y = viewportOrigin.Y - (180d - mapOrigin.Y) * ViewportScale;
if (Math.Abs(mapOrigin.X - oldMapOriginX) > 180d)
if (viewportChanged != null)
{
// immediately handle map origin leap when map center moves across 180° longitude
UpdateTiles(this, EventArgs.Empty);
}
else
{
SetTileLayerTransform();
if (!UpdateTilesWhileViewportChanging)
{
tileUpdateTimer.Stop();
}
tileUpdateTimer.Start();
}
}
private void UpdateTiles(object sender, object e)
{
tileUpdateTimer.Stop();
var zoomLevel = (int)Math.Round(ZoomLevel + ZoomLevelSwitchDelta);
var transform = GetTileIndexMatrix((double)(1 << zoomLevel) / 360d);
// tile indices of visible rectangle
var p1 = transform.Transform(new Point(0d, 0d));
var p2 = transform.Transform(new Point(RenderSize.Width, 0d));
var p3 = transform.Transform(new Point(0d, RenderSize.Height));
var p4 = transform.Transform(new Point(RenderSize.Width, RenderSize.Height));
// index ranges of visible tiles
var x1 = (int)Math.Floor(Math.Min(p1.X, Math.Min(p2.X, Math.Min(p3.X, p4.X))));
var y1 = (int)Math.Floor(Math.Min(p1.Y, Math.Min(p2.Y, Math.Min(p3.Y, p4.Y))));
var x2 = (int)Math.Floor(Math.Max(p1.X, Math.Max(p2.X, Math.Max(p3.X, p4.X))));
var y2 = (int)Math.Floor(Math.Max(p1.Y, Math.Max(p2.Y, Math.Max(p3.Y, p4.Y))));
var grid = new Int32Rect(x1, y1, x2 - x1 + 1, y2 - y1 + 1);
if (TileZoomLevel != zoomLevel || TileGrid != grid)
{
TileZoomLevel = zoomLevel;
TileGrid = grid;
SetTileLayerTransform();
var tileGridChanged = TileGridChanged;
if (tileGridChanged != null)
{
tileGridChanged(this, EventArgs.Empty);
}
viewportChanged(this, EventArgs.Empty);
}
}
}

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

View file

@ -4,9 +4,8 @@
using System;
using System.Linq;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml;
#else
using System.Windows;

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
#else

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media.Imaging;
#else

View file

@ -4,7 +4,7 @@
using System;
using System.Globalization;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@ -33,6 +33,10 @@ namespace MapControl
public static readonly DependencyProperty RelativeImageSizeProperty = DependencyProperty.Register(
"RelativeImageSize", typeof(double), typeof(MapImageLayer), new PropertyMetadata(1d));
public static readonly DependencyProperty UpdateIntervalProperty = DependencyProperty.Register(
"UpdateInterval", typeof(TimeSpan), typeof(MapImageLayer),
new PropertyMetadata(TimeSpan.FromSeconds(0.5), (o, e) => ((MapImageLayer)o).updateTimer.Interval = (TimeSpan)e.NewValue));
private readonly DispatcherTimer updateTimer;
private int currentImageIndex;
private bool updateInProgress;
@ -42,7 +46,7 @@ namespace MapControl
Children.Add(new MapImage { Opacity = 0d });
Children.Add(new MapImage { Opacity = 0d });
updateTimer = new DispatcherTimer { Interval = MapBase.TileUpdateInterval };
updateTimer = new DispatcherTimer { Interval = UpdateInterval };
updateTimer.Tick += (s, e) => UpdateImage();
}
@ -69,6 +73,15 @@ namespace MapControl
set { SetValue(RelativeImageSizeProperty, value); }
}
/// <summary>
/// Minimum time interval between images updates.
/// </summary>
public TimeSpan UpdateInterval
{
get { return (TimeSpan)GetValue(UpdateIntervalProperty); }
set { SetValue(UpdateIntervalProperty, value); }
}
protected override void OnViewportChanged()
{
base.OnViewportChanged();
@ -119,26 +132,28 @@ namespace MapControl
{
if (UriFormat != null && width > 0 && height > 0)
{
var uri = UriFormat.Replace("{X}", width.ToString()).Replace("{Y}", height.ToString());
var uri = UriFormat
.Replace("{X}", width.ToString())
.Replace("{Y}", height.ToString());
if (uri.Contains("{W}") && uri.Contains("{S}") && uri.Contains("{E}") && uri.Contains("{N}"))
{
var p1 = ParentMap.MapTransform.Transform(new Location(south, west));
var p2 = ParentMap.MapTransform.Transform(new Location(north, east));
uri = uri.
Replace("{W}", (TileSource.MetersPerDegree * p1.X).ToString(CultureInfo.InvariantCulture)).
Replace("{S}", (TileSource.MetersPerDegree * p1.Y).ToString(CultureInfo.InvariantCulture)).
Replace("{E}", (TileSource.MetersPerDegree * p2.X).ToString(CultureInfo.InvariantCulture)).
Replace("{N}", (TileSource.MetersPerDegree * p2.Y).ToString(CultureInfo.InvariantCulture));
uri = uri
.Replace("{W}", (TileSource.MetersPerDegree * p1.X).ToString(CultureInfo.InvariantCulture))
.Replace("{S}", (TileSource.MetersPerDegree * p1.Y).ToString(CultureInfo.InvariantCulture))
.Replace("{E}", (TileSource.MetersPerDegree * p2.X).ToString(CultureInfo.InvariantCulture))
.Replace("{N}", (TileSource.MetersPerDegree * p2.Y).ToString(CultureInfo.InvariantCulture));
}
else
{
uri = uri.
Replace("{w}", west.ToString(CultureInfo.InvariantCulture)).
Replace("{s}", south.ToString(CultureInfo.InvariantCulture)).
Replace("{e}", east.ToString(CultureInfo.InvariantCulture)).
Replace("{n}", north.ToString(CultureInfo.InvariantCulture));
uri = uri
.Replace("{w}", west.ToString(CultureInfo.InvariantCulture))
.Replace("{s}", south.ToString(CultureInfo.InvariantCulture))
.Replace("{e}", east.ToString(CultureInfo.InvariantCulture))
.Replace("{n}", north.ToString(CultureInfo.InvariantCulture));
}
UpdateImage(west, east, south, north, new Uri(uri));

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml.Controls;
#else
using System.Windows.Controls;

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#else

View file

@ -2,15 +2,21 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if !NETFX_CORE
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
#else
using Windows.UI.Text;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media;
#else
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
namespace MapControl
{
class FontStyles { public const FontStyle Normal = FontStyle.Normal; }
class FontStretches { public const FontStretch Normal = FontStretch.Normal; }
}
#endif
namespace MapControl
@ -21,16 +27,16 @@ namespace MapControl
"FontSize", typeof(double), typeof(MapOverlay), new PropertyMetadata(10d));
public static readonly DependencyProperty FontFamilyProperty = DependencyProperty.Register(
"FontFamily", typeof(FontFamily), typeof(MapOverlay), new PropertyMetadata(default(FontFamily)));
"FontFamily", typeof(FontFamily), typeof(MapOverlay), new PropertyMetadata(null));
public static readonly DependencyProperty FontStyleProperty = DependencyProperty.Register(
"FontStyle", typeof(FontStyle), typeof(MapOverlay), new PropertyMetadata(default(FontStyle)));
"FontStyle", typeof(FontStyle), typeof(MapOverlay), new PropertyMetadata(FontStyles.Normal));
public static readonly DependencyProperty FontStretchProperty = DependencyProperty.Register(
"FontStretch", typeof(FontStretch), typeof(MapOverlay), new PropertyMetadata(default(FontStretch)));
"FontStretch", typeof(FontStretch), typeof(MapOverlay), new PropertyMetadata(FontStretches.Normal));
public static readonly DependencyProperty FontWeightProperty = DependencyProperty.Register(
"FontWeight", typeof(FontWeight), typeof(MapOverlay), new PropertyMetadata(default(FontWeight)));
"FontWeight", typeof(FontWeight), typeof(MapOverlay), new PropertyMetadata(FontWeights.Normal));
public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register(
"Foreground", typeof(Brush), typeof(MapOverlay), new PropertyMetadata(null));
@ -48,16 +54,16 @@ namespace MapControl
"StrokeDashOffset", typeof(double), typeof(MapOverlay), new PropertyMetadata(0d));
public static readonly DependencyProperty StrokeDashCapProperty = DependencyProperty.Register(
"StrokeDashCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(default(PenLineCap)));
"StrokeDashCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(PenLineCap.Flat));
public static readonly DependencyProperty StrokeStartLineCapProperty = DependencyProperty.Register(
"StrokeStartLineCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(default(PenLineCap)));
"StrokeStartLineCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(PenLineCap.Flat));
public static readonly DependencyProperty StrokeEndLineCapProperty = DependencyProperty.Register(
"StrokeEndLineCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(default(PenLineCap)));
"StrokeEndLineCap", typeof(PenLineCap), typeof(MapOverlay), new PropertyMetadata(PenLineCap.Flat));
public static readonly DependencyProperty StrokeLineJoinProperty = DependencyProperty.Register(
"StrokeLineJoin", typeof(PenLineJoin), typeof(MapOverlay), new PropertyMetadata(default(PenLineJoin)));
"StrokeLineJoin", typeof(PenLineJoin), typeof(MapOverlay), new PropertyMetadata(PenLineJoin.Miter));
public static readonly DependencyProperty StrokeMiterLimitProperty = DependencyProperty.Register(
"StrokeMiterLimit", typeof(double), typeof(MapOverlay), new PropertyMetadata(1d));

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Text;
using Windows.UI.Xaml.Media;
#else

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
#else

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
@ -15,9 +15,9 @@ using System.Windows.Media;
namespace MapControl
{
/// <summary>
/// Arranges child elements on a Map at positions specified by the attached property Location,
/// which is transformed to a viewport position by ParentMap.MapTransform and ParentMap.ViewportTransform
/// and assigned to the child element's RenderTransform as a TranslateTransform.
/// Arranges child elements on a Map at positions specified by the attached property Location.
/// The Location value is transformed to a viewport position and assigned as TranslateTransform
/// to the RenderTransform of the element, either directly or as last child of a TransformGroup.
/// </summary>
public partial class MapPanel : PanelBase, IMapElement
{
@ -42,22 +42,6 @@ namespace MapControl
set { SetParentMapOverride(value); }
}
protected virtual void SetParentMapOverride(MapBase map)
{
if (parentMap != null && parentMap != this)
{
parentMap.ViewportChanged -= OnViewportChanged;
}
parentMap = map;
if (parentMap != null && parentMap != this)
{
parentMap.ViewportChanged += OnViewportChanged;
OnViewportChanged();
}
}
protected override Size ArrangeOverride(Size finalSize)
{
foreach (UIElement element in Children)
@ -78,6 +62,22 @@ namespace MapControl
return finalSize;
}
protected virtual void SetParentMapOverride(MapBase map)
{
if (parentMap != null && parentMap != this)
{
parentMap.ViewportChanged -= OnViewportChanged;
}
parentMap = map;
if (parentMap != null && parentMap != this)
{
parentMap.ViewportChanged += OnViewportChanged;
OnViewportChanged();
}
}
protected virtual void OnViewportChanged()
{
foreach (UIElement element in Children)
@ -112,8 +112,6 @@ namespace MapControl
if (element != null)
{
var mapElement = element as IMapElement;
var parentMap = mapElement != null ? mapElement.ParentMap : GetParentMap(element);
var location = e.NewValue as Location;
if (location == null)
@ -125,7 +123,7 @@ namespace MapControl
ArrangeElementWithLocation(element); // arrange element when Location was null before
}
SetViewportPosition(element, parentMap, location);
SetViewportPosition(element, GetParentMap(element), location);
}
}
@ -139,9 +137,7 @@ namespace MapControl
viewportPosition = parentMap.ViewportTransform.Transform(mapPosition);
var useLayoutRounding = element.GetValue(FrameworkElement.UseLayoutRoundingProperty);
if (useLayoutRounding != null && (bool)useLayoutRounding)
if ((bool)element.GetValue(FrameworkElement.UseLayoutRoundingProperty))
{
viewportPosition.X = Math.Round(viewportPosition.X);
viewportPosition.Y = Math.Round(viewportPosition.Y);

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Shapes;
@ -30,7 +30,7 @@ namespace MapControl
Stretch = Stretch.None;
}
// Work-around for missing PropertyChangedCallback for the Data property.
// Workaround for missing PropertyChangedCallback for the Data property.
if (data != Data)
{
data = Data;

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml.Media;
#else
using System.Windows.Media;

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System.Linq;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
#else

View file

@ -4,7 +4,7 @@
using System.Collections.Generic;
using System.Collections.Specialized;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using System.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
@ -21,7 +21,7 @@ namespace MapControl
/// </summary>
public partial class MapPolyline : MapPath
{
#if WINDOWS_RUNTIME
#if NETFX_CORE
// Binding fails on Windows Phone when property type is IEnumerable<Location>
public static readonly DependencyProperty LocationsProperty = DependencyProperty.Register(
"Locations", typeof(IEnumerable), typeof(MapPolyline),
@ -38,7 +38,7 @@ namespace MapControl
/// <summary>
/// Gets or sets the locations that define the polyline points.
/// </summary>
#if !WINDOWS_RUNTIME
#if !NETFX_CORE
[TypeConverter(typeof(LocationCollectionConverter))]
#endif
public IEnumerable<Location> Locations

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
@ -94,7 +94,7 @@ namespace MapControl
{
var rect = new Rect(ParentMap.MapTransform.Transform(new Location(South, West)),
ParentMap.MapTransform.Transform(new Location(North, East)));
var transform = ParentMap.ViewportTransform;
Transform transform = ParentMap.ViewportTransform;
ScaleRect(ref rect, ref transform);
@ -109,6 +109,6 @@ namespace MapControl
}
}
static partial void ScaleRect(ref Rect rect, ref Transform transform);
static partial void ScaleRect(ref Rect rect, ref Transform transform); // WPF only
}
}

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
#else
using System.Windows;

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml.Media;
#else
using System.Windows.Media;

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
#else
using System.Windows;

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

View file

@ -17,8 +17,8 @@ using System.Windows;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -2,7 +2,7 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml.Controls;
#else
using System.Windows.Controls;

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml.Controls;
#else
using System.Windows.Controls;

View file

@ -2,6 +2,13 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if NETFX_CORE
using Windows.UI.Xaml.Media;
#else
using System.Windows.Media;
#endif
namespace MapControl
{
public partial class TileLayer
@ -9,7 +16,31 @@ namespace MapControl
partial void Initialize()
{
IsHitTestVisible = false;
MapPanel.AddParentMapHandlers(this);
}
private Matrix GetTileIndexMatrix(int zoomLevel)
{
var scale = (double)(1 << zoomLevel) / 360d;
return parentMap.ViewportTransform.Matrix
.Invert() // view to map coordinates
.Translate(180d, -180d)
.Scale(scale, -scale); // map coordinates to tile indices
}
private void SetRenderTransform()
{
var scale = Math.Pow(2d, parentMap.ZoomLevel - TileZoomLevel);
var offsetX = parentMap.ViewportOrigin.X - (180d + parentMap.MapOrigin.X) * parentMap.ViewportScale;
var offsetY = parentMap.ViewportOrigin.Y - (180d - parentMap.MapOrigin.Y) * parentMap.ViewportScale;
((MatrixTransform)RenderTransform).Matrix =
new Matrix(1d, 0d, 0d, 1d, TileRect.X * TileSource.TileSize, TileRect.Y * TileSource.TileSize)
.Scale(scale, scale)
.Translate(offsetX, offsetY)
.RotateAt(parentMap.Heading, parentMap.ViewportOrigin.X, parentMap.ViewportOrigin.Y); ;
}
}
}

View file

@ -2,7 +2,9 @@
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
using System;
using System.Windows;
using System.Windows.Media;
namespace MapControl
{
@ -13,5 +15,31 @@ namespace MapControl
UIElement.IsHitTestVisibleProperty.OverrideMetadata(
typeof(TileLayer), new FrameworkPropertyMetadata(false));
}
private Matrix GetTileIndexMatrix(int zoomLevel)
{
var scale = (double)(1 << zoomLevel) / 360d;
var transform = parentMap.ViewportTransform.Matrix;
transform.Invert(); // view to map coordinates
transform.Translate(180d, -180d);
transform.Scale(scale, -scale); // map coordinates to tile indices
return transform;
}
private void SetRenderTransform()
{
var scale = Math.Pow(2d, parentMap.ZoomLevel - TileZoomLevel);
var offsetX = parentMap.ViewportOrigin.X - (180d + parentMap.MapOrigin.X) * parentMap.ViewportScale;
var offsetY = parentMap.ViewportOrigin.Y - (180d - parentMap.MapOrigin.Y) * parentMap.ViewportScale;
var transform = new Matrix(1d, 0d, 0d, 1d, TileRect.X * TileSource.TileSize, TileRect.Y * TileSource.TileSize);
transform.Scale(scale, scale);
transform.Translate(offsetX, offsetY);
transform.RotateAt(parentMap.Heading, parentMap.ViewportOrigin.X, parentMap.ViewportOrigin.Y);
((MatrixTransform)RenderTransform).Matrix = transform;
}
}
}

View file

@ -5,7 +5,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Markup;
@ -14,6 +14,8 @@ using Windows.UI.Xaml.Media;
using System.Windows;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Threading;
using System.Diagnostics;
#endif
namespace MapControl
@ -21,14 +23,14 @@ namespace MapControl
/// <summary>
/// Fills a rectangular area with map tiles from a TileSource.
/// </summary>
#if WINDOWS_RUNTIME
#if NETFX_CORE
[ContentProperty(Name = "TileSource")]
#else
[ContentProperty("TileSource")]
#endif
public partial class TileLayer : PanelBase, IMapElement
{
public static TileLayer Default
public static TileLayer OpenStreetMapTileLayer
{
get
{
@ -54,6 +56,10 @@ namespace MapControl
public static readonly DependencyProperty LogoImageProperty = DependencyProperty.Register(
"LogoImage", typeof(ImageSource), typeof(TileLayer), new PropertyMetadata(null));
public static readonly DependencyProperty ZoomLevelOffsetProperty = DependencyProperty.Register(
"ZoomLevelOffset", typeof(double), typeof(TileLayer),
new PropertyMetadata(0d, (o, e) => ((TileLayer)o).UpdateTileRect()));
public static readonly DependencyProperty MinZoomLevelProperty = DependencyProperty.Register(
"MinZoomLevel", typeof(int), typeof(TileLayer), new PropertyMetadata(0));
@ -63,15 +69,22 @@ namespace MapControl
public static readonly DependencyProperty MaxParallelDownloadsProperty = DependencyProperty.Register(
"MaxParallelDownloads", typeof(int), typeof(TileLayer), new PropertyMetadata(4));
public static readonly DependencyProperty UpdateIntervalProperty = DependencyProperty.Register(
"UpdateInterval", typeof(TimeSpan), typeof(TileLayer),
new PropertyMetadata(TimeSpan.FromSeconds(0.5), (o, e) => ((TileLayer)o).updateTimer.Interval = (TimeSpan)e.NewValue));
public static readonly DependencyProperty UpdateWhileViewportChangingProperty = DependencyProperty.Register(
"UpdateWhileViewportChanging", typeof(bool), typeof(TileLayer), new PropertyMetadata(true));
public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register(
"Foreground", typeof(Brush), typeof(TileLayer), new PropertyMetadata(null));
public static readonly new DependencyProperty BackgroundProperty = DependencyProperty.Register(
"Background", typeof(Brush), typeof(TileLayer), new PropertyMetadata(null));
private readonly ITileImageLoader tileImageLoader;
private List<Tile> tiles = new List<Tile>();
private readonly DispatcherTimer updateTimer;
private MapBase parentMap;
private double mapOriginX;
public TileLayer()
: this(new TileImageLoader())
@ -80,11 +93,23 @@ namespace MapControl
public TileLayer(ITileImageLoader tileImageLoader)
{
this.tileImageLoader = tileImageLoader;
Initialize();
RenderTransform = new MatrixTransform();
TileImageLoader = tileImageLoader;
Tiles = new List<Tile>();
TileZoomLevel = -1;
updateTimer = new DispatcherTimer { Interval = UpdateInterval };
updateTimer.Tick += (s, e) => UpdateTileRect();
}
partial void Initialize();
partial void Initialize(); // Windows Runtime and Silverlight only
public ITileImageLoader TileImageLoader { get; private set; }
public ICollection<Tile> Tiles { get; private set; }
public Int32Rect TileRect { get; private set; }
public int TileZoomLevel { get; private set; }
/// <summary>
/// Provides map tile URIs or images.
@ -122,6 +147,15 @@ namespace MapControl
set { SetValue(LogoImageProperty, value); }
}
/// <summary>
/// Adds an offset to the Map's ZoomLevel for a relative scale between the Map and the TileLayer.
/// </summary>
public double ZoomLevelOffset
{
get { return (double)GetValue(ZoomLevelOffsetProperty); }
set { SetValue(ZoomLevelOffsetProperty, value); }
}
/// <summary>
/// Minimum zoom level supported by the TileLayer.
/// </summary>
@ -149,6 +183,24 @@ namespace MapControl
set { SetValue(MaxParallelDownloadsProperty, value); }
}
/// <summary>
/// Minimum time interval between tile updates.
/// </summary>
public TimeSpan UpdateInterval
{
get { return (TimeSpan)GetValue(UpdateIntervalProperty); }
set { SetValue(UpdateIntervalProperty, value); }
}
/// <summary>
/// Controls if tiles are updates while the viewport is still changing.
/// </summary>
public bool UpdateWhileViewportChanging
{
get { return (bool)GetValue(UpdateWhileViewportChangingProperty); }
set { SetValue(UpdateWhileViewportChangingProperty, value); }
}
/// <summary>
/// Optional foreground brush. Sets MapBase.Foreground, if not null.
/// </summary>
@ -175,63 +227,110 @@ namespace MapControl
{
if (parentMap != null)
{
parentMap.TileGridChanged -= UpdateTiles;
ClearValue(RenderTransformProperty);
parentMap.ViewportChanged -= ViewportChanged;
TileZoomLevel = -1;
UpdateTiles(true);
}
parentMap = value;
if (parentMap != null)
{
parentMap.TileGridChanged += UpdateTiles;
RenderTransform = parentMap.TileLayerTransform;
parentMap.ViewportChanged += ViewportChanged;
ViewportChanged(this, EventArgs.Empty);
}
UpdateTiles();
}
}
protected virtual void UpdateTiles(bool clearTiles = false)
private void ViewportChanged(object sender, EventArgs e)
{
if (tiles.Count > 0)
if (TileZoomLevel < 0 || Math.Abs(parentMap.MapOrigin.X - mapOriginX) > 180d)
{
tileImageLoader.CancelLoadTiles(this);
// immediately handle map origin leap when map center moves across 180° longitude
UpdateTileRect();
}
else
{
SetRenderTransform();
if (!UpdateWhileViewportChanging)
{
updateTimer.Stop();
}
updateTimer.Start();
}
mapOriginX = parentMap.MapOrigin.X;
}
protected void UpdateTileRect()
{
updateTimer.Stop();
if (parentMap != null)
{
var zoomLevel = (int)Math.Round(parentMap.ZoomLevel + ZoomLevelOffset);
var transform = GetTileIndexMatrix(zoomLevel);
// tile indices of visible rectangle
var p1 = transform.Transform(new Point(0d, 0d));
var p2 = transform.Transform(new Point(parentMap.RenderSize.Width, 0d));
var p3 = transform.Transform(new Point(0d, parentMap.RenderSize.Height));
var p4 = transform.Transform(new Point(parentMap.RenderSize.Width, parentMap.RenderSize.Height));
// index ranges of visible tiles
var x1 = (int)Math.Floor(Math.Min(p1.X, Math.Min(p2.X, Math.Min(p3.X, p4.X))));
var y1 = (int)Math.Floor(Math.Min(p1.Y, Math.Min(p2.Y, Math.Min(p3.Y, p4.Y))));
var x2 = (int)Math.Floor(Math.Max(p1.X, Math.Max(p2.X, Math.Max(p3.X, p4.X))));
var y2 = (int)Math.Floor(Math.Max(p1.Y, Math.Max(p2.Y, Math.Max(p3.Y, p4.Y))));
var rect = new Int32Rect(x1, y1, x2 - x1 + 1, y2 - y1 + 1);
if (TileZoomLevel != zoomLevel || TileRect != rect)
{
TileZoomLevel = zoomLevel;
TileRect = rect;
SetRenderTransform();
UpdateTiles(false);
}
}
}
protected virtual void UpdateTiles(bool clearTiles)
{
if (Tiles.Count > 0)
{
TileImageLoader.CancelLoadTiles(this);
}
if (clearTiles)
{
tiles.Clear();
Tiles.Clear();
}
SelectTiles();
Children.Clear();
if (tiles.Count > 0)
if (Tiles.Count > 0)
{
foreach (var tile in tiles)
foreach (var tile in Tiles)
{
Children.Add(tile.Image);
}
tileImageLoader.BeginLoadTiles(this, tiles.Where(t => t.Pending));
TileImageLoader.BeginLoadTiles(this, Tiles.Where(t => t.Pending).OrderByDescending(t => t.ZoomLevel));
}
}
private void UpdateTiles(object sender, EventArgs e)
{
UpdateTiles();
}
private void SelectTiles()
protected void SelectTiles()
{
var newTiles = new List<Tile>();
if (parentMap != null && TileSource != null)
if (TileZoomLevel >= 0 && parentMap != null && TileSource != null)
{
var grid = parentMap.TileGrid;
var zoomLevel = parentMap.TileZoomLevel;
var maxZoomLevel = Math.Min(zoomLevel, MaxZoomLevel);
var maxZoomLevel = Math.Min(TileZoomLevel, MaxZoomLevel);
var minZoomLevel = MinZoomLevel;
if (minZoomLevel < maxZoomLevel && this != parentMap.TileLayers.FirstOrDefault())
@ -242,23 +341,23 @@ namespace MapControl
for (var z = minZoomLevel; z <= maxZoomLevel; z++)
{
var tileSize = 1 << (zoomLevel - z);
var x1 = (int)Math.Floor((double)grid.X / tileSize); // may be negative
var x2 = (grid.X + grid.Width - 1) / tileSize;
var y1 = Math.Max(grid.Y / tileSize, 0);
var y2 = Math.Min((grid.Y + grid.Height - 1) / tileSize, (1 << z) - 1);
var tileSize = 1 << (TileZoomLevel - z);
var x1 = (int)Math.Floor((double)TileRect.X / tileSize); // may be negative
var x2 = (TileRect.X + TileRect.Width - 1) / tileSize;
var y1 = Math.Max(TileRect.Y / tileSize, 0);
var y2 = Math.Min((TileRect.Y + TileRect.Height - 1) / tileSize, (1 << z) - 1);
for (var y = y1; y <= y2; y++)
{
for (var x = x1; x <= x2; x++)
{
var tile = tiles.FirstOrDefault(t => t.ZoomLevel == z && t.X == x && t.Y == y);
var tile = Tiles.FirstOrDefault(t => t.ZoomLevel == z && t.X == x && t.Y == y);
if (tile == null)
{
tile = new Tile(z, x, y);
var equivalentTile = tiles.FirstOrDefault(
var equivalentTile = Tiles.FirstOrDefault(
t => t.ZoomLevel == z && t.XIndex == tile.XIndex && t.Y == y && t.Image.Source != null);
if (equivalentTile != null)
@ -274,18 +373,18 @@ namespace MapControl
}
}
tiles = newTiles;
Tiles = newTiles;
}
protected override Size ArrangeOverride(Size finalSize)
{
if (parentMap != null)
if (TileZoomLevel >= 0)
{
foreach (var tile in tiles)
foreach (var tile in Tiles)
{
var tileSize = (double)(256 << (parentMap.TileZoomLevel - tile.ZoomLevel));
var x = tileSize * tile.X - 256 * parentMap.TileGrid.X;
var y = tileSize * tile.Y - 256 * parentMap.TileGrid.Y;
var tileSize = (double)(256 << (TileZoomLevel - tile.ZoomLevel));
var x = tileSize * tile.X - 256 * TileRect.X;
var y = tileSize * tile.Y - 256 * TileRect.Y;
tile.Image.Width = tileSize;
tile.Image.Height = tileSize;

View file

@ -12,7 +12,7 @@ namespace MapControl
/// </summary>
public partial class TileSource
{
public const int TileSize = 256;
public const double TileSize = 256;
public const double MetersPerDegree = 6378137d * Math.PI / 180d; // WGS 84 semi major axis
private Func<int, int, int, Uri> getUri;
@ -84,10 +84,10 @@ namespace MapControl
private Uri GetBasicUri(int x, int y, int zoomLevel)
{
return new Uri(uriFormat.
Replace("{x}", x.ToString()).
Replace("{y}", y.ToString()).
Replace("{z}", zoomLevel.ToString()),
return new Uri(uriFormat
.Replace("{x}", x.ToString())
.Replace("{y}", y.ToString())
.Replace("{z}", zoomLevel.ToString()),
UriKind.RelativeOrAbsolute);
}
@ -95,11 +95,11 @@ namespace MapControl
{
var hostIndex = (x + y) % 3;
return new Uri(uriFormat.
Replace("{c}", "abc".Substring(hostIndex, 1)).
Replace("{x}", x.ToString()).
Replace("{y}", y.ToString()).
Replace("{z}", zoomLevel.ToString()),
return new Uri(uriFormat
.Replace("{c}", "abc".Substring(hostIndex, 1))
.Replace("{x}", x.ToString())
.Replace("{y}", y.ToString())
.Replace("{z}", zoomLevel.ToString()),
UriKind.RelativeOrAbsolute);
}
@ -107,11 +107,11 @@ namespace MapControl
{
var hostIndex = (x + y) % 4;
return new Uri(uriFormat.
Replace("{i}", hostIndex.ToString()).
Replace("{x}", x.ToString()).
Replace("{y}", y.ToString()).
Replace("{z}", zoomLevel.ToString()),
return new Uri(uriFormat
.Replace("{i}", hostIndex.ToString())
.Replace("{x}", x.ToString())
.Replace("{y}", y.ToString())
.Replace("{z}", zoomLevel.ToString()),
UriKind.RelativeOrAbsolute);
}
@ -119,11 +119,11 @@ namespace MapControl
{
var hostIndex = (x + y) % 4 + 1;
return new Uri(uriFormat.
Replace("{n}", hostIndex.ToString()).
Replace("{x}", x.ToString()).
Replace("{y}", y.ToString()).
Replace("{z}", zoomLevel.ToString()),
return new Uri(uriFormat
.Replace("{n}", hostIndex.ToString())
.Replace("{x}", x.ToString())
.Replace("{y}", y.ToString())
.Replace("{z}", zoomLevel.ToString()),
UriKind.RelativeOrAbsolute);
}
@ -131,10 +131,10 @@ namespace MapControl
{
y = (1 << zoomLevel) - 1 - y;
return new Uri(uriFormat.
Replace("{x}", x.ToString()).
Replace("{v}", y.ToString()).
Replace("{z}", zoomLevel.ToString()),
return new Uri(uriFormat
.Replace("{x}", x.ToString())
.Replace("{v}", y.ToString())
.Replace("{z}", zoomLevel.ToString()),
UriKind.RelativeOrAbsolute);
}
@ -152,9 +152,9 @@ namespace MapControl
quadkey[z] = (char)('0' + 2 * (y % 2) + (x % 2));
}
return new Uri(uriFormat.
Replace("{i}", new string(quadkey[zoomLevel - 1], 1)).
Replace("{q}", new string(quadkey)),
return new Uri(uriFormat
.Replace("{i}", new string(quadkey[zoomLevel - 1], 1))
.Replace("{q}", new string(quadkey)),
UriKind.RelativeOrAbsolute);
}
@ -165,12 +165,15 @@ namespace MapControl
var east = MetersPerDegree * ((double)(x + 1) * tileSize - 180d);
var south = MetersPerDegree * (180d - (double)(y + 1) * tileSize);
var north = MetersPerDegree * (180d - (double)y * tileSize);
var imageSize = TileSize.ToString("F0");
return new Uri(uriFormat.
Replace("{W}", west.ToString(CultureInfo.InvariantCulture)).
Replace("{S}", south.ToString(CultureInfo.InvariantCulture)).
Replace("{E}", east.ToString(CultureInfo.InvariantCulture)).
Replace("{N}", north.ToString(CultureInfo.InvariantCulture)));
return new Uri(uriFormat
.Replace("{W}", west.ToString(CultureInfo.InvariantCulture))
.Replace("{S}", south.ToString(CultureInfo.InvariantCulture))
.Replace("{E}", east.ToString(CultureInfo.InvariantCulture))
.Replace("{N}", north.ToString(CultureInfo.InvariantCulture))
.Replace("{X}", imageSize)
.Replace("{Y}", imageSize));
}
private Uri GetLatLonBoundingBoxUri(int x, int y, int zoomLevel)
@ -180,12 +183,15 @@ namespace MapControl
var east = (double)(x + 1) * tileSize - 180d;
var south = MercatorTransform.YToLatitude(180d - (double)(y + 1) * tileSize);
var north = MercatorTransform.YToLatitude(180d - (double)y * tileSize);
var imageSize = TileSize.ToString("F0");
return new Uri(uriFormat.
Replace("{w}", west.ToString(CultureInfo.InvariantCulture)).
Replace("{s}", south.ToString(CultureInfo.InvariantCulture)).
Replace("{e}", east.ToString(CultureInfo.InvariantCulture)).
Replace("{n}", north.ToString(CultureInfo.InvariantCulture)));
return new Uri(uriFormat
.Replace("{w}", west.ToString(CultureInfo.InvariantCulture))
.Replace("{s}", south.ToString(CultureInfo.InvariantCulture))
.Replace("{e}", east.ToString(CultureInfo.InvariantCulture))
.Replace("{n}", north.ToString(CultureInfo.InvariantCulture))
.Replace("{X}", imageSize)
.Replace("{Y}", imageSize));
}
}
}

View file

@ -23,7 +23,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWS_RUNTIME</DefineConstants>
<DefineConstants>TRACE;DEBUG;NETFX_CORE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@ -31,7 +31,7 @@
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWS_RUNTIME</DefineConstants>
<DefineConstants>TRACE;NETFX_CORE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@ -169,17 +169,16 @@
<Link>MapControl.snk</Link>
</None>
</ItemGroup>
<ItemGroup>
<TargetPlatform Include="Windows, Version=8.1" />
<TargetPlatform Include="WindowsPhoneApp, Version=8.1" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Page Include="Themes\Generic.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<TargetPlatform Include="Windows, Version=8.1" />
<TargetPlatform Include="WindowsPhoneApp, Version=8.1" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0' ">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
@ -198,8 +197,7 @@
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<PostBuildEvent>copy "$(ProjectDir)MapControl.WinRT.xr.xml" "$(TargetDir)"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Roots>
<Roots.RootTypes>
<RootType FullName="Windows.UI.Xaml.ResourceDictionary" />
<RootType FullName="MapControl.MapItemsControl" />
<RootType FullName="Windows.UI.Xaml.Controls.Control">
<RootProperty Name="Template" />
<RootProperty Name="HorizontalContentAlignment" />
<RootProperty Name="VerticalContentAlignment" />
<RootProperty Name="Padding" />
<RootProperty Name="Foreground" />
<RootProperty Name="Background" />
</RootType>
<RootType FullName="Windows.UI.Xaml.Controls.ItemsControl">
<RootProperty Name="ItemsPanel" />
</RootType>
<RootType FullName="MapControl.MapItem" />
<RootType FullName="Windows.UI.Xaml.FrameworkElement">
<RootProperty Name="HorizontalAlignment" />
<RootProperty Name="VerticalAlignment" />
</RootType>
<RootType FullName="MapControl.Pushpin" />
<RootType FullName="Windows.UI.Xaml.Setter">
<RootProperty Name="Property" />
<RootProperty Name="Value" />
</RootType>
<RootType FullName="Windows.UI.Xaml.Controls.ControlTemplate">
<RootProperty Name="TargetType" />
<RootProperty Name="Template" />
</RootType>
<RootType FullName="Windows.UI.Xaml.Controls.Grid">
<RootProperty Name="RowDefinitions" />
<RootProperty Name="Children" />
<RootMethod Name="GetRow" />
<RootMethod Name="SetRow" />
</RootType>
<RootType FullName="Windows.UI.Xaml.Controls.RowDefinition">
<RootProperty Name="Height" />
</RootType>
<RootType FullName="Windows.UI.Xaml.Shapes.Rectangle">
<RootProperty Name="Fill" />
</RootType>
<RootType FullName="Windows.UI.Xaml.Shapes.Path">
<RootProperty Name="Fill" />
<RootProperty Name="Data" />
</RootType>
<RootType FullName="Windows.UI.Xaml.Controls.ContentPresenter">
<RootProperty Name="Content" />
<RootProperty Name="ContentTemplate" />
<RootProperty Name="Margin" />
<RootProperty Name="HorizontalAlignment" />
<RootProperty Name="VerticalAlignment" />
</RootType>
<RootType FullName="Microsoft.Xaml.Tools.DirectUI.ProxyTypes.TemplateBindingExtension" />
<RootType FullName="Windows.UI.Xaml.Controls.ItemsPanelTemplate">
<RootProperty Name="Template" />
</RootType>
<RootType FullName="MapControl.MapPanel" />
<RootType FullName="Windows.UI.Xaml.Controls.ItemsPresenter" />
</Roots.RootTypes>
</Roots>

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -1,3 +1,8 @@
The Visual Studio Project for Windows Runtime resides in a separate folder
MapControl/WinRT, because it needs to have its own Themes/Generic.xaml file.
Output is generated to ../bin.
Output is generated to ../bin.
This folder also contains the file MapControl.WinRT.xr.xml, which overwrites
the generated file in the output folder. This is to remove the XML namespace
declaration on the <Roots> element, which prevents a .NET Native build of a
Universal Windows App that uses the MapControl.WinRT portable library.

View file

@ -2,7 +2,7 @@
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
#if WINDOWS_RUNTIME
#if NETFX_CORE
using Windows.UI.Xaml;
#else
using System.Windows.Threading;

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
<Identity Name="XamlMapControl.PhoneApp" Publisher="CN=Clemens" Version="2.4.0.0" />
<Identity Name="XamlMapControl.PhoneApp" Publisher="CN=Clemens" Version="2.5.0.0" />
<mp:PhoneIdentity PhoneProductId="a28a99bb-a24b-4713-a6ea-3015d8aa2d72" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>XAML Map Control Phone Application</DisplayName>

View file

@ -14,7 +14,7 @@
<MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<AppxBundle>Always</AppxBundle>
<AppxBundle>Never</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -28,7 +28,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DeviceId>30F105C9-681E-420b-A277-7C086EAD8A4E</DeviceId>
<DeviceId>20DCA81D-A315-40BC-9B83-B6A01D31DBC6</DeviceId>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<DeviceId>30F105C9-681E-420b-A277-7C086EAD8A4E</DeviceId>

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -11,7 +11,7 @@
<UserControl.Resources>
<map:TileLayerCollection x:Key="TileLayers">
<!--
TileLayers with OpenStreetMap data.
TileLayers with OpenStreetMap data.
-->
<map:TileLayer SourceName="OpenStreetMap"
Description="Maps © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)"
@ -42,10 +42,10 @@
MinZoomLevel="10" MaxZoomLevel="18"/>
<!--
Bing Maps TileLayers with tile URLs retrieved from the Imagery Metadata Service
(see http://msdn.microsoft.com/en-us/library/ff701716.aspx).
A Bing Maps API Key (see http://msdn.microsoft.com/en-us/library/ff428642.aspx) is required
for using these layers and must be assigned to the static BingMapsTileLayer.ApiKey property.
Bing Maps TileLayers with tile URLs retrieved from the Imagery Metadata Service
(see http://msdn.microsoft.com/en-us/library/ff701716.aspx).
A Bing Maps API Key (see http://msdn.microsoft.com/en-us/library/ff428642.aspx) is required
for using these layers and must be assigned to the static BingMapsTileLayer.ApiKey property.
-->
<map:BingMapsTileLayer SourceName="Bing Maps Road"
Description="© [Microsoft Corporation](http://www.bing.com/maps/)"

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -8,7 +8,7 @@
<Page.Resources>
<map:TileLayerCollection x:Key="TileLayers">
<!--
TileLayers with OpenStreetMap data.
TileLayers with OpenStreetMap data.
-->
<map:TileLayer SourceName="OpenStreetMap"
Description="Maps © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)"
@ -46,10 +46,10 @@
</map:TileLayer>
<!--
Bing Maps TileLayers with tile URLs retrieved from the Imagery Metadata Service
(see http://msdn.microsoft.com/en-us/library/ff701716.aspx).
A Bing Maps API Key (see http://msdn.microsoft.com/en-us/library/ff428642.aspx) is required
for using these layers and must be assigned to the static BingMapsTileLayer.ApiKey property.
Bing Maps TileLayers with tile URLs retrieved from the Imagery Metadata Service
(see http://msdn.microsoft.com/en-us/library/ff701716.aspx).
A Bing Maps API Key (see http://msdn.microsoft.com/en-us/library/ff428642.aspx) is required
for using these layers and must be assigned to the static BingMapsTileLayer.ApiKey property.
-->
<map:BingMapsTileLayer SourceName="Bing Maps Road"
Description="Bing Maps - © Microsoft Corporation"

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
<Identity Name="XamlMapControl.StoreApp" Publisher="CN=Clemens" Version="2.4.0.0" />
<Identity Name="XamlMapControl.StoreApp" Publisher="CN=Clemens" Version="2.5.0.0" />
<Properties>
<DisplayName>XAML Map Control Store Application</DisplayName>
<PublisherDisplayName>Clemens</PublisherDisplayName>

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: ComVisible(false)]

View file

@ -33,7 +33,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWS_RUNTIME</DefineConstants>
<DefineConstants>TRACE;NETFX_CORE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

View file

@ -0,0 +1,8 @@
<Application
x:Class="UniversalApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UniversalApp"
RequestedTheme="Light">
</Application>

View file

@ -0,0 +1,49 @@
using System;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace UniversalApp
{
sealed partial class App : Application
{
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
if (rootFrame == null)
{
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
Window.Current.Content = rootFrame;
}
if (rootFrame.Content == null)
{
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
Window.Current.Activate();
}
private void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
deferral.Complete();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -0,0 +1,36 @@
using MapControl;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;
namespace UniversalApp
{
public class BindingHelper
{
public static readonly DependencyProperty LocationPathProperty = DependencyProperty.RegisterAttached(
"LocationPath", typeof(string), typeof(BindingHelper),
new PropertyMetadata(null, LocationPathPropertyChanged));
public static string GetLocationPath(DependencyObject obj)
{
return (string)obj.GetValue(LocationPathProperty);
}
public static void SetLocationPath(DependencyObject obj, string value)
{
obj.SetValue(LocationPathProperty, value);
}
private static void LocationPathPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
{
var propertyPath = e.NewValue as string;
if (propertyPath != null)
{
BindingOperations.SetBinding(
obj,
MapPanel.LocationProperty,
new Binding { Path = new PropertyPath(propertyPath) });
}
}
}
}

View file

@ -0,0 +1,256 @@
<Page
x:Class="UniversalApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:map="using:MapControl"
xmlns:vm="using:ViewModel"
xmlns:local="using:UniversalApp">
<Page.Resources>
<map:TileLayerCollection x:Key="TileLayers">
<!--
TileLayers with OpenStreetMap data.
-->
<map:TileLayer SourceName="OpenStreetMap"
Description="Maps © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)"
MaxZoomLevel="19">
<map:TileSource UriFormat="http://{c}.tile.openstreetmap.org/{z}/{x}/{y}.png"/>
</map:TileLayer>
<map:TileLayer SourceName="Thunderforest OpenCycleMap"
Description="Maps © [Thunderforest](http://www.thunderforest.com/), Data © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)">
<map:TileSource UriFormat="http://{c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png"/>
</map:TileLayer>
<map:TileLayer SourceName="Thunderforest Landscape"
Description="Maps © [Thunderforest](http://www.thunderforest.com/), Data © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)">
<map:TileSource UriFormat="http://{c}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png"/>
</map:TileLayer>
<map:TileLayer SourceName="Thunderforest Outdoors"
Description="Maps © [Thunderforest](http://www.thunderforest.com/), Data © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)">
<map:TileSource UriFormat="http://{c}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png"/>
</map:TileLayer>
<map:TileLayer SourceName="Thunderforest Transport"
Description="Maps © [Thunderforest](http://www.thunderforest.com/), Data © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)">
<map:TileSource UriFormat="http://{c}.tile.thunderforest.com/transport/{z}/{x}/{y}.png"/>
</map:TileLayer>
<map:TileLayer SourceName="Thunderforest Transport Dark"
Description="Maps © [Thunderforest](http://www.thunderforest.com/), Data © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)"
Foreground="White" Background="Black">
<map:TileSource UriFormat="http://{c}.tile.thunderforest.com/transport-dark/{z}/{x}/{y}.png"/>
</map:TileLayer>
<map:TileLayer SourceName="MapQuest OpenStreetMap"
Description="Maps © [MapQuest](http://www.mapquest.com/), Data © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)">
<map:TileSource UriFormat="http://otile{n}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png"/>
</map:TileLayer>
<map:TileLayer SourceName="Seamarks" Description="© OpenSeaMap Contributors"
MinZoomLevel="10" MaxZoomLevel="18">
<map:TileSource UriFormat="http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png"/>
</map:TileLayer>
<!--
Bing Maps TileLayers with tile URLs retrieved from the Imagery Metadata Service
(see http://msdn.microsoft.com/en-us/library/ff701716.aspx).
A Bing Maps API Key (see http://msdn.microsoft.com/en-us/library/ff428642.aspx) is required
for using these layers and must be assigned to the static BingMapsTileLayer.ApiKey property.
-->
<map:BingMapsTileLayer SourceName="Bing Maps Road"
Description="Bing Maps - © Microsoft Corporation"
Mode="Road" MaxZoomLevel="19"/>
<map:BingMapsTileLayer SourceName="Bing Maps Aerial"
Description="Bing Maps - © Microsoft Corporation"
Mode="Aerial" MaxZoomLevel="19" Foreground="White" Background="Black"/>
<map:BingMapsTileLayer SourceName="Bing Maps Hybrid"
Description="Bing Maps - © Microsoft Corporation"
Mode="AerialWithLabels" MaxZoomLevel="19" Foreground="White" Background="Black"/>
</map:TileLayerCollection>
<DataTemplate x:Key="PolylineItemTemplate">
<map:MapPolyline Locations="{Binding Locations}" Stroke="Red" StrokeThickness="3"/>
</DataTemplate>
<Style x:Key="PolylineItemStyle" TargetType="map:MapItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="map:MapItem">
<map:MapPolyline Locations="{Binding Locations}" Stroke="Red" StrokeThickness="3"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PointItemStyle" TargetType="map:MapItem">
<Setter Property="local:BindingHelper.LocationPath" Value="Location"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="map:MapItem">
<Canvas>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="Disabled"/>
<VisualState x:Name="PointerOver">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="labelBackground" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected"/>
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="SelectedUnfocus">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="SelectedDisable">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="SelectedPointer">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="SelectedPressed">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Path x:Name="selectedPath" Fill="White" Opacity="0">
<Path.Data>
<EllipseGeometry RadiusX="15" RadiusY="15"/>
</Path.Data>
</Path>
<Path Fill="Transparent" Stroke="Gray" StrokeThickness="2">
<Path.Data>
<EllipseGeometry RadiusX="8" RadiusY="8"/>
</Path.Data>
</Path>
<Grid Canvas.Left="15" Canvas.Top="-8">
<Rectangle x:Name="labelBackground" Fill="White" Opacity="0.7"/>
<TextBlock Margin="2,0,2,0" Text="{Binding Name}"/>
</Grid>
</Canvas>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PushpinItemStyle" TargetType="map:MapItem">
<Setter Property="local:BindingHelper.LocationPath" Value="Location"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="map:MapItem">
<map:Pushpin Content="{Binding Name}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Page.Resources>
<Page.DataContext>
<vm:ViewModel/>
</Page.DataContext>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<map:Map x:Name="map" TileLayer="{Binding [OpenStreetMap], Source={StaticResource TileLayers}}"
Center="{Binding MapCenter}" MinZoomLevel="2" MaxZoomLevel="18" ZoomLevel="11" ManipulationMode="All">
<map:MapImage x:Name="mapImage" South="53.54031" North="53.74871" West="8.08594" East="8.43750"
Source="10_535_330.jpg" Opacity="0.5"/>
<map:MapGraticule Opacity="0.6"/>
<!-- use ItemTemplate or ItemContainerStyle alternatively -->
<map:MapItemsControl ItemsSource="{Binding Polylines}"
ItemTemplate="{StaticResource PolylineItemTemplate}"/>
<!--<map:MapItemsControl ItemsSource="{Binding Polylines}"
ItemContainerStyle="{StaticResource PolylineItemStyle}"/>-->
<map:MapItemsControl ItemsSource="{Binding Points}"
ItemContainerStyle="{StaticResource PointItemStyle}"
SelectionMode="Extended"/>
<map:MapItemsControl ItemsSource="{Binding Pushpins}"
ItemContainerStyle="{StaticResource PushpinItemStyle}"/>
<Path Stroke="Blue" StrokeThickness="3">
<map:MapPanel.Location>
<map:Location Latitude="53.5" Longitude="8.2"/>
</map:MapPanel.Location>
<Path.Data>
<EllipseGeometry RadiusX="1852" RadiusY="1852" Transform="{Binding ScaleTransform, ElementName=map}"/>
</Path.Data>
</Path>
<map:MapPath Fill="Aqua" Opacity="0.5">
<map:MapPath.Data>
<GeometryGroup FillRule="EvenOdd">
<EllipseGeometry Center="8.2,63.5" RadiusX="0.025" RadiusY="0.025"/>
<EllipseGeometry Center="8.2,63.51" RadiusX="0.015" RadiusY="0.015"/>
</GeometryGroup>
</map:MapPath.Data>
</map:MapPath>
<map:Pushpin Background="Yellow" Foreground="Blue" Content="N 53° 30' E 8° 12'">
<map:MapPanel.Location>
<map:Location Latitude="53.5" Longitude="8.2"/>
</map:MapPanel.Location>
</map:Pushpin>
</map:Map>
<Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#BFFFFFFF">
<TextBlock Margin="2" FontSize="10" Foreground="Black"
map:HyperlinkText.InlinesSource="{Binding TileLayer.Description, ElementName=map}"/>
</Border>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
<StackPanel Margin="5">
<TextBlock Text="Zoom Level" HorizontalAlignment="Center" Foreground="Gray" FontSize="14"/>
<Slider Margin="10,-10,10,-10" Width="200" SmallChange="0.1"
Minimum="{Binding MinZoomLevel, ElementName=map}"
Maximum="{Binding MaxZoomLevel, ElementName=map}"
Value="{Binding TargetZoomLevel, ElementName=map, Mode=TwoWay}"/>
</StackPanel>
<StackPanel Margin="5">
<TextBlock Text="Heading" HorizontalAlignment="Center" Foreground="Gray" FontSize="14"/>
<Slider Margin="10,-10,10,-10" Width="200" Minimum="0" Maximum="360" SmallChange="5" LargeChange="45"
Value="{Binding Heading, ElementName=map, Mode=TwoWay}"/>
</StackPanel>
<StackPanel Margin="5">
<TextBlock Text="Image Opacity" HorizontalAlignment="Center" Foreground="Gray" FontSize="14"/>
<Slider Margin="10,-10,10,-10" Width="200" Value="50" ValueChanged="ImageOpacitySliderValueChanged"/>
</StackPanel>
<CheckBox Margin="10" VerticalAlignment="Center" Content="Seamarks"
Checked="SeamarksChecked" Unchecked="SeamarksUnchecked"/>
<ComboBox Width="200" Margin="10" VerticalAlignment="Center"
SelectedValuePath="Tag" SelectedValue="{Binding TileLayer, ElementName=map, Mode=TwoWay}">
<ComboBoxItem Tag="{Binding [OpenStreetMap], Source={StaticResource TileLayers}}">OpenStreetMap</ComboBoxItem>
<ComboBoxItem Tag="{Binding [Thunderforest OpenCycleMap], Source={StaticResource TileLayers}}">OpenCycleMap</ComboBoxItem>
<ComboBoxItem Tag="{Binding [Thunderforest Landscape], Source={StaticResource TileLayers}}">Landscape</ComboBoxItem>
<ComboBoxItem Tag="{Binding [Thunderforest Outdoors], Source={StaticResource TileLayers}}">Outdoors</ComboBoxItem>
<ComboBoxItem Tag="{Binding [Thunderforest Transport], Source={StaticResource TileLayers}}">Transport</ComboBoxItem>
<ComboBoxItem Tag="{Binding [Thunderforest Transport Dark], Source={StaticResource TileLayers}}">Transport Dark</ComboBoxItem>
<ComboBoxItem Tag="{Binding [MapQuest OpenStreetMap], Source={StaticResource TileLayers}}">MapQuest Open</ComboBoxItem>
<!--<ComboBoxItem Tag="{Binding [Bing Maps Road], Source={StaticResource TileLayers}}">Bing Maps Road</ComboBoxItem>
<ComboBoxItem Tag="{Binding [Bing Maps Aerial], Source={StaticResource TileLayers}}">Bing Maps Aerial</ComboBoxItem>
<ComboBoxItem Tag="{Binding [Bing Maps Hybrid], Source={StaticResource TileLayers}}">Bing Maps Hybrid</ComboBoxItem>-->
</ComboBox>
</StackPanel>
</Grid>
</Grid>
</Page>

View file

@ -0,0 +1,35 @@
using MapControl;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
namespace UniversalApp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
//TileImageLoader.Cache = new MapControl.Caching.ImageFileCache();
this.InitializeComponent();
}
private void ImageOpacitySliderValueChanged(object sender, RangeBaseValueChangedEventArgs e)
{
if (mapImage != null)
{
mapImage.Opacity = e.NewValue / 100;
}
}
private void SeamarksChecked(object sender, RoutedEventArgs e)
{
map.TileLayers.Add(((TileLayerCollection)Resources["TileLayers"])["Seamarks"]);
}
private void SeamarksUnchecked(object sender, RoutedEventArgs e)
{
map.TileLayers.Remove(((TileLayerCollection)Resources["TileLayers"])["Seamarks"]);
}
}
}

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="XamlMapControl.UniversalApp" Publisher="CN=Clemens" Version="2.5.0.0" />
<mp:PhoneIdentity PhoneProductId="6781ec09-e195-49eb-9a20-b25a8dc39b2a" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>UniversalApp</DisplayName>
<PublisherDisplayName>Clemens</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="UniversalApp.App">
<uap:VisualElements DisplayName="XAML Map Control Test Application" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="UniversalApp" BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

View file

@ -0,0 +1,14 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Windows Universal Sample Application")]
[assembly: AssemblyDescription("XAML Map Control Windows Universal Sample Application")]
[assembly: AssemblyProduct("XAML Map Control")]
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: ComVisible(false)]

View file

@ -0,0 +1,31 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

View file

@ -0,0 +1,167 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UniversalApp</RootNamespace>
<AssemblyName>UniversalApp</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageCertificateKeyFile>UniversalApp_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>false</UseDotNetNativeToolchain>
<EnableGatekeeperAnalysis>false</EnableGatekeeperAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>none</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
<EnableGatekeeperAnalysis>false</EnableGatekeeperAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>false</UseDotNetNativeToolchain>
<EnableGatekeeperAnalysis>false</EnableGatekeeperAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>none</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
<EnableGatekeeperAnalysis>false</EnableGatekeeperAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>false</UseDotNetNativeToolchain>
<EnableGatekeeperAnalysis>false</EnableGatekeeperAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>none</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
<EnableGatekeeperAnalysis>false</EnableGatekeeperAnalysis>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Common\ViewModel.cs">
<Link>ViewModel.cs</Link>
</Compile>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="BindingHelper.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="UniversalApp_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Content Include="..\Common\10_535_330.jpg">
<Link>10_535_330.jpg</Link>
</Content>
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Caching\ImageFileCache.WinRT\ImageFileCache.WinRT.csproj">
<Project>{f789647e-96f7-43e3-a895-fa3fe8d01260}</Project>
<Name>ImageFileCache.WinRT</Name>
</ProjectReference>
<ProjectReference Include="..\..\MapControl\WinRT\MapControl.WinRT.csproj">
<Project>{63cefdf7-5170-43b6-86f8-5c4a383a1615}</Project>
<Name>MapControl.WinRT</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DeviceId>30F105C9-681E-420b-A277-7C086EAD8A4E</DeviceId>
<UseEmulator>true</UseEmulator>
</PropertyGroup>
</Project>

Binary file not shown.

View file

@ -0,0 +1,16 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}

File diff suppressed because it is too large Load diff

View file

@ -9,7 +9,7 @@
Stylus.IsPressAndHoldEnabled="False">
<Window.Resources>
<!--
TileLayers with OpenStreetMap data.
TileLayers with OpenStreetMap data.
-->
<map:TileLayer x:Key="OpenStreetMap" SourceName="OpenStreetMap"
Description="Maps © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)"
@ -40,10 +40,18 @@
MinZoomLevel="9" MaxZoomLevel="18"/>
<!--
Bing Maps TileLayers with tile URLs retrieved from the Imagery Metadata Service
(see http://msdn.microsoft.com/en-us/library/ff701716.aspx).
A Bing Maps API Key (see http://msdn.microsoft.com/en-us/library/ff428642.aspx) is required
for using these layers and must be assigned to the static BingMapsTileLayer.ApiKey property.
A TileLayer using World OSM WMS, a Web Map Service based on OpenStreetMap data.
Please contact the provider at http://www.osm-wms.de/ if you intend to use this in an application.
-->
<map:TileLayer x:Key="WorldOsm" SourceName="World OSM WMS"
Description="[World OSM WMS](http://www.osm-wms.de/) © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)"
TileSource="http://129.206.228.72/cached/osm?SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;LAYERS=osm_auto:all&amp;STYLES=&amp;SRS=EPSG:900913&amp;BBOX={W},{S},{E},{N}&amp;WIDTH={X}&amp;HEIGHT={Y}&amp;FORMAT=image/png"/>
<!--
Bing Maps TileLayers with tile URLs retrieved from the Imagery Metadata Service
(see http://msdn.microsoft.com/en-us/library/ff701716.aspx).
A Bing Maps API Key (see http://msdn.microsoft.com/en-us/library/ff428642.aspx) is required
for using these layers and must be assigned to the static BingMapsTileLayer.ApiKey property.
-->
<map:BingMapsTileLayer x:Key="BingRoad" SourceName="Bing Maps Road"
Description="© [Microsoft Corporation](http://www.bing.com/maps/)"
@ -56,14 +64,7 @@
Mode="AerialWithLabels" MaxZoomLevel="19" Foreground="White" Background="Black"/>
<!--
A TileLayer for World OSM WMS, a Web Map Service based on OpenStreetMap data.
-->
<!--<map:TileLayer x:Key="WorldOsm" SourceName="World OSM WMS"
Description="[World OSM WMS](http://www.osm-wms.de/) © [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)"
TileSource="http://129.206.228.72/cached/osm?SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;LAYERS=osm_auto:all&amp;STYLES=&amp;SRS=EPSG:900913&amp;BBOX={W},{S},{E},{N}&amp;WIDTH=256&amp;HEIGHT=256&amp;FORMAT=image/png"/>-->
<!--
A TileLayer that uses an ImageTileSource
A TileLayer that uses an ImageTileSource
-->
<!--<map:TileLayer x:Key="OsmImageTileSource"
Description="© [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)">
@ -71,7 +72,7 @@
</map:TileLayer>-->
<!--
A TileLayer that demonstrates how to access local tile image files (from ImageFileCache here)
A TileLayer that demonstrates how to access local tile image files (from ImageFileCache here)
-->
<!--<map:TileLayer x:Key="OsmLocalFiles"
Description="© [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)"
@ -283,6 +284,7 @@
<ComboBoxItem Tag="{StaticResource Transport}">Transport</ComboBoxItem>
<ComboBoxItem Tag="{StaticResource TransportDark}">Transport Dark</ComboBoxItem>
<ComboBoxItem Tag="{StaticResource MapQuest}">MapQuest Open</ComboBoxItem>
<!--<ComboBoxItem Tag="{StaticResource WorldOsm}">World OSM WMS</ComboBoxItem>-->
<!--<ComboBoxItem Tag="{StaticResource BingRoad}">Bing Maps Road</ComboBoxItem>
<ComboBoxItem Tag="{StaticResource BingAerial}">Bing Maps Aerial</ComboBoxItem>
<ComboBoxItem Tag="{StaticResource BingHybrid}">Bing Maps Hybrid</ComboBoxItem>-->

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("© 2015 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("2.4.12")]
[assembly: AssemblyFileVersion("2.4.12")]
[assembly: AssemblyVersion("2.5.0")]
[assembly: AssemblyFileVersion("2.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]