├── .gitattributes ├── .gitignore ├── LiveTileTask ├── LiveTileTask.csproj ├── Properties │ └── AssemblyInfo.cs └── Update.cs ├── Prebuilt ├── Temp │ ├── Microsoft.UI.Xaml.dll │ ├── Microsoft.UI.Xaml.pri │ └── Microsoft.UI.Xaml.winmd ├── arm │ ├── Microsoft.UI.Xaml.dll │ ├── Microsoft.UI.Xaml.pri │ └── Microsoft.UI.Xaml.winmd └── ffmpeg.dll ├── WinGoMapsX.sln ├── WinGoMapsX ├── App.AuSupport.xaml ├── App.DeviceFamily-Mobile.xaml ├── App.xaml ├── App.xaml.cs ├── AppCommand.cs ├── Assets │ ├── BlackLogo.png │ ├── BlackLogo2.png │ ├── Branding.jpg │ ├── DirectionsIcons │ │ ├── fork-left.png │ │ ├── fork-right.png │ │ ├── merge.png │ │ ├── ramp-left.png │ │ ├── ramp-right.png │ │ ├── roundabout-left.png │ │ ├── roundabout-right.png │ │ ├── straight.png │ │ ├── turn-left.png │ │ ├── turn-right.png │ │ ├── turn-sharp-left.png │ │ ├── turn-sharp-right.png │ │ ├── turn-slight-left.png │ │ ├── turn-slight-right.png │ │ ├── uturn-left.png │ │ └── uturn-right.png │ ├── LargeTile.scale-100.png │ ├── LargeTile.scale-125.png │ ├── LargeTile.scale-150.png │ ├── LargeTile.scale-200.png │ ├── LargeTile.scale-400.png │ ├── LockScreenLogo.scale-200.png │ ├── Noise.png │ ├── Noise3.png │ ├── SmallTile.scale-100.png │ ├── SmallTile.scale-125.png │ ├── SmallTile.scale-150.png │ ├── SmallTile.scale-200.png │ ├── SmallTile.scale-400.png │ ├── SplashScreen.scale-100.png │ ├── SplashScreen.scale-125.png │ ├── SplashScreen.scale-150.png │ ├── SplashScreen.scale-200.png │ ├── SplashScreen.scale-400.png │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-125.png │ ├── Square150x150Logo.scale-150.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ ├── Square44x44Logo.scale-100.png │ ├── Square44x44Logo.scale-125.png │ ├── Square44x44Logo.scale-150.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.scale-400.png │ ├── Square44x44Logo.targetsize-16.png │ ├── Square44x44Logo.targetsize-24.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── Square44x44Logo.targetsize-256.png │ ├── Square44x44Logo.targetsize-32.png │ ├── Square44x44Logo.targetsize-48.png │ ├── StoreLogo.backup.png │ ├── StoreLogo.png │ ├── StoreLogo.scale-100.png │ ├── StoreLogo.scale-125.png │ ├── StoreLogo.scale-150.png │ ├── StoreLogo.scale-200.png │ ├── StoreLogo.scale-400.png │ ├── Wide310x150Logo.scale-100.png │ ├── Wide310x150Logo.scale-125.png │ ├── Wide310x150Logo.scale-150.png │ ├── Wide310x150Logo.scale-200.png │ └── Wide310x150Logo.scale-400.png ├── ChangeLog.txt ├── Converter │ └── ValueToIsEnabledConverter.cs ├── ExtendedSplashScreen.xaml ├── ExtendedSplashScreen.xaml.cs ├── Helpers │ ├── ClassInfo.cs │ ├── CountryCodesHelper.cs │ ├── ExtentionMethods.cs │ ├── GeoLocatorHelper.cs │ ├── InternalHelper.cs │ ├── MultilingualHelpToolkit.cs │ ├── TileCoordinateHelper.cs │ └── VoiceNavigationHelper.cs ├── MainPage.DeviceFamily-Mobile.xaml ├── MainPage.xaml ├── MainPage.xaml.cs ├── Microsoft.UI.Xaml │ ├── Assets │ │ └── NoiseAsset_256X256_PNG.png │ └── Themes │ │ ├── Generic.xaml │ │ ├── rs1_themeresources.xaml │ │ ├── rs2_generic.xaml │ │ ├── rs2_themeresources.xaml │ │ └── rs3_themeresources.xaml ├── Package.appxmanifest ├── Properties │ ├── AssemblyInfo.cs │ └── Default.rd.xml ├── Resources │ └── CustomControls │ │ ├── AutoSuggestionBox.xaml │ │ ├── DirectionsButton.xaml │ │ ├── DotButton.xaml │ │ ├── MoreInfoHyperLink.xaml │ │ └── TabbedPivot.xaml ├── Strings │ ├── Be-By │ │ └── Resources.resw │ ├── DE-DE │ │ └── Resources.resw │ ├── ES │ │ └── Resources.resw │ ├── En-Us │ │ └── Resources.resw │ ├── Fa-Ir │ │ └── Resources.resw │ ├── Fr-Fr │ │ └── Resources.resw │ ├── Pt-Br │ │ └── Resources.resw │ ├── ar │ │ └── Resources.resw │ ├── cs-cz │ │ └── Resources.resw │ ├── it │ │ └── Resources.resw │ ├── ja-JP │ │ └── Resources.resw │ └── tr-tr │ │ └── Resources.resw ├── View │ ├── BookmarkAdd.xaml │ ├── BookmarkAdd.xaml.cs │ ├── DirectionsControls │ │ ├── FullStepsProvider.xaml │ │ ├── FullStepsProvider.xaml.cs │ │ ├── NewDirections.DeviceFamily-Mobile.xaml │ │ ├── NewDirections.xaml │ │ ├── NewDirections.xaml.cs │ │ ├── StepsTitleProvider.xaml │ │ └── StepsTitleProvider.xaml.cs │ ├── MapView.DeviceFamily-Mobile.xaml │ ├── MapView.xaml │ ├── MapView.xaml.cs │ ├── OfflineMapDownloader │ │ ├── MapDownloaderView.xaml │ │ └── MapDownloaderView.xaml.cs │ ├── OnMapControls │ │ ├── ChangeViewUserControl.xaml │ │ ├── ChangeViewUserControl.xaml.cs │ │ ├── MyLocationUserControl.xaml │ │ ├── MyLocationUserControl.xaml.cs │ │ ├── SearchUserControl.DeviceFamily-Mobile.xaml │ │ ├── SearchUserControl.xaml │ │ ├── SearchUserControl.xaml.cs │ │ ├── ZoomUserControl.xaml │ │ └── ZoomUserControl.xaml.cs │ └── SettingsView │ │ ├── SettingsLanguageView.xaml │ │ ├── SettingsLanguageView.xaml.cs │ │ ├── SettingsMainView.xaml │ │ └── SettingsMainView.xaml.cs ├── ViewModel │ ├── MapViewVM.cs │ ├── OfflineMapDownloader │ │ └── MapDLHelper.cs │ ├── OnMapControls │ │ ├── ChangeViewUCVM.cs │ │ └── SearchUserControlVM.cs │ ├── PlacesControls │ │ └── SavedPlacesVM.cs │ └── SettingsView │ │ ├── SettingsLanguageVM.cs │ │ └── SettingsMainVM.cs ├── VoiceCommands.xml └── WinGoMapsX.csproj ├── WinGoService ├── Cortana.cs ├── Properties │ └── AssemblyInfo.cs └── WinGoService.csproj └── readme.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | AppCore.cs 179 | _pkginfo.txt 180 | 181 | # Visual Studio cache files 182 | # files ending in .cache can be ignored 183 | *.[Cc]ache 184 | # but keep track of directories ending in .cache 185 | !*.[Cc]ache/ 186 | 187 | # Others 188 | ClientBin/ 189 | ~$* 190 | *~ 191 | *.dbmdl 192 | *.dbproj.schemaview 193 | *.jfm 194 | *.pfx 195 | *.publishsettings 196 | node_modules/ 197 | orleans.codegen.cs 198 | 199 | # Since there are multiple workflows, uncomment next line to ignore bower_components 200 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 201 | #bower_components/ 202 | 203 | # RIA/Silverlight projects 204 | Generated_Code/ 205 | 206 | # Backup & report files from converting an old project file 207 | # to a newer Visual Studio version. Backup files are not needed, 208 | # because we have git ;-) 209 | _UpgradeReport_Files/ 210 | Backup*/ 211 | UpgradeLog*.XML 212 | UpgradeLog*.htm 213 | 214 | # SQL Server files 215 | *.mdf 216 | *.ldf 217 | 218 | # Business Intelligence projects 219 | *.rdl.data 220 | *.bim.layout 221 | *.bim_*.settings 222 | 223 | # Microsoft Fakes 224 | FakesAssemblies/ 225 | 226 | # GhostDoc plugin setting file 227 | *.GhostDoc.xml 228 | 229 | # Node.js Tools for Visual Studio 230 | .ntvs_analysis.dat 231 | 232 | # Visual Studio 6 build log 233 | *.plg 234 | 235 | # Visual Studio 6 workspace options file 236 | *.opt 237 | 238 | # Visual Studio LightSwitch build output 239 | **/*.HTMLClient/GeneratedArtifacts 240 | **/*.DesktopClient/GeneratedArtifacts 241 | **/*.DesktopClient/ModelManifest.xml 242 | **/*.Server/GeneratedArtifacts 243 | **/*.Server/ModelManifest.xml 244 | _Pvt_Extensions 245 | 246 | # Paket dependency manager 247 | .paket/paket.exe 248 | paket-files/ 249 | 250 | # FAKE - F# Make 251 | .fake/ 252 | 253 | # JetBrains Rider 254 | .idea/ 255 | *.sln.iml 256 | 257 | # CodeRush 258 | .cr/ 259 | 260 | # Python Tools for Visual Studio (PTVS) 261 | __pycache__/ 262 | *.pyc -------------------------------------------------------------------------------- /LiveTileTask/LiveTileTask.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F} 8 | winmdobj 9 | Properties 10 | LiveTileTask 11 | LiveTileTask 12 | en-US 13 | UAP 14 | 10.0.17134.0 15 | 10.0.14393.0 16 | 14 17 | 512 18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | false 20 | 21 | 22 | AnyCPU 23 | true 24 | full 25 | false 26 | bin\Debug\ 27 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 28 | prompt 29 | 4 30 | 31 | 32 | AnyCPU 33 | pdbonly 34 | true 35 | bin\Release\ 36 | TRACE;NETFX_CORE;WINDOWS_UWP 37 | prompt 38 | 4 39 | 40 | 41 | x86 42 | true 43 | bin\x86\Debug\ 44 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 45 | ;2008 46 | full 47 | x86 48 | false 49 | prompt 50 | 51 | 52 | x86 53 | bin\x86\Release\ 54 | TRACE;NETFX_CORE;WINDOWS_UWP 55 | true 56 | ;2008 57 | pdbonly 58 | x86 59 | false 60 | prompt 61 | 62 | 63 | ARM 64 | true 65 | bin\ARM\Debug\ 66 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 67 | ;2008 68 | full 69 | ARM 70 | false 71 | prompt 72 | 73 | 74 | ARM 75 | bin\ARM\Release\ 76 | TRACE;NETFX_CORE;WINDOWS_UWP 77 | true 78 | ;2008 79 | pdbonly 80 | ARM 81 | false 82 | prompt 83 | 84 | 85 | x64 86 | true 87 | bin\x64\Debug\ 88 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 89 | ;2008 90 | full 91 | x64 92 | false 93 | prompt 94 | 95 | 96 | x64 97 | bin\x64\Release\ 98 | TRACE;NETFX_CORE;WINDOWS_UWP 99 | true 100 | ;2008 101 | pdbonly 102 | x64 103 | false 104 | prompt 105 | 106 | 107 | PackageReference 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 6.1.5 116 | 117 | 118 | 11.0.2 119 | 120 | 121 | 122 | 14.0 123 | 124 | 125 | 132 | -------------------------------------------------------------------------------- /LiveTileTask/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("LiveTileTask")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LiveTileTask")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /LiveTileTask/Update.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Windows.ApplicationModel.Background; 3 | using Windows.Data.Xml.Dom; 4 | using Windows.Devices.Geolocation; 5 | using Windows.Networking.Connectivity; 6 | using Windows.Storage; 7 | using Windows.UI.Notifications; 8 | using Windows.Web.Http; 9 | 10 | namespace LiveTileTask 11 | { 12 | public sealed class Update : IBackgroundTask 13 | { 14 | public async void Run(IBackgroundTaskInstance taskInstance) 15 | { 16 | try 17 | { 18 | var def = taskInstance.GetDeferral(); 19 | if (await Geolocator.RequestAccessAsync() == GeolocationAccessStatus.Allowed) 20 | { 21 | var geolocator = new Geolocator(); 22 | var Location = await geolocator.GetGeopositionAsync(); 23 | var ul = Location.Coordinate.Point.Position; 24 | if(InternetConnection()) 25 | { 26 | var http = new HttpClient(); 27 | http.DefaultRequestHeaders.UserAgent.ParseAdd("MahStudioWinGoMaps"); 28 | var res = await (await http.GetAsync(new Uri($"https://maps.googleapis.com/maps/api/staticmap?center={ul.Latitude},{ul.Longitude}&zoom=16&size=200x200", UriKind.RelativeOrAbsolute))).Content.ReadAsBufferAsync(); 29 | var reswide = await (await http.GetAsync(new Uri($"https://maps.googleapis.com/maps/api/staticmap?center={ul.Latitude},{ul.Longitude}&zoom=16&size=310x150", UriKind.RelativeOrAbsolute))).Content.ReadAsBufferAsync(); 30 | var resLarge = await (await http.GetAsync(new Uri($"https://maps.googleapis.com/maps/api/staticmap?center={ul.Latitude},{ul.Longitude}&zoom=16&size=310x310", UriKind.RelativeOrAbsolute))).Content.ReadAsBufferAsync(); 31 | var f = await ApplicationData.Current.LocalFolder.CreateFileAsync("LiveTile.png", CreationCollisionOption.OpenIfExists); 32 | var fWide = await ApplicationData.Current.LocalFolder.CreateFileAsync("LiveTileWide.png", CreationCollisionOption.OpenIfExists); 33 | var fLarge = await ApplicationData.Current.LocalFolder.CreateFileAsync("LiveTileLarge.png", CreationCollisionOption.OpenIfExists); 34 | var str = await f.OpenAsync(FileAccessMode.ReadWrite); 35 | var strwide = await fWide.OpenAsync(FileAccessMode.ReadWrite); 36 | var strLarge = await fLarge.OpenAsync(FileAccessMode.ReadWrite); 37 | await str.WriteAsync(res); 38 | await strwide.WriteAsync(reswide); 39 | await strLarge.WriteAsync(resLarge); 40 | str.Dispose(); 41 | strwide.Dispose(); 42 | strLarge.Dispose(); 43 | } 44 | else 45 | { 46 | try 47 | { 48 | var tc = new TileCoordinate(ul.Latitude, ul.Longitude, 16); 49 | var x = tc.x; 50 | //mah_x_{x}-y_{y}-z_{zoomlevel}.jpeg 51 | var f = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appdata:///local/MahMaps/mah_x_{tc.x}-y_{tc.y}-z_16.jpeg")); 52 | await f.CopyAsync(ApplicationData.Current.LocalFolder, "LiveTile.png"); 53 | } 54 | catch 55 | { 56 | 57 | } 58 | } 59 | var update = TileUpdateManager.CreateTileUpdaterForApplication(); 60 | string xml = "\n"; 61 | xml += "\n"; 62 | xml += " \n"; 63 | xml += " \n"; 64 | xml += " \n"; 65 | xml += " \n"; 66 | xml += " \n"; 67 | xml += " \n"; 68 | xml += " \n"; 69 | xml += " \n"; 70 | xml += " \n"; 71 | xml += "\n"; 72 | xml += ""; 73 | 74 | XmlDocument txml = new XmlDocument(); 75 | txml.LoadXml(xml); 76 | TileNotification tNotification = new TileNotification(txml); 77 | 78 | update.Clear(); 79 | update.Update(tNotification); 80 | } 81 | def.Complete(); 82 | } 83 | catch (Exception ex) 84 | { 85 | } 86 | } 87 | public static bool InternetConnection() 88 | { 89 | ConnectionProfile connections = NetworkInformation.GetInternetConnectionProfile(); 90 | if (connections != null && connections.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess) 91 | return true; 92 | else return false; 93 | } 94 | } 95 | class TileCoordinate 96 | { 97 | public TileCoordinate(double lat, double lon, int zoom) 98 | { 99 | this.lat = lat; 100 | this.lon = lon; 101 | this.zoom = zoom; 102 | } 103 | public double y; 104 | public double x; 105 | public double lat; 106 | public double lon; 107 | public int zoom; 108 | public bool LocationCoord() 109 | { 110 | if (Math.Abs(this.lat) > 85.0511287798066) 111 | return false; 112 | double sin_phi = Math.Sin(this.lat * Math.PI / 180); 113 | double norm_x = this.lon / 180; 114 | double norm_y = (0.5 * Math.Log((1 + sin_phi) / (1 - sin_phi))) / Math.PI; 115 | this.y = Math.Pow(2, this.zoom) * ((1 - norm_y) / 2); 116 | this.x = Math.Pow(2, this.zoom) * ((norm_x + 1) / 2); 117 | return true; 118 | } 119 | 120 | public static BasicGeoposition ReverseGeoPoint(double x, double y, double z) 121 | { 122 | var Lng = 180 * ((2 * x) / (Math.Pow(2, z)) - 1); 123 | var Lat = (180 / Math.PI) * 124 | Math.Asin((Math.Pow(Math.E, (2 * Math.PI * (1 - ((2 * y) / Math.Pow(2, z))))) - 1) 125 | / (1 + Math.Pow(Math.E, (2 * Math.PI * (1 - ((2 * y) / Math.Pow(2, z))))))); 126 | return new BasicGeoposition() { Latitude = Lat, Longitude = Lng }; 127 | 128 | } 129 | 130 | } 131 | 132 | } 133 | -------------------------------------------------------------------------------- /Prebuilt/Temp/Microsoft.UI.Xaml.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/Prebuilt/Temp/Microsoft.UI.Xaml.dll -------------------------------------------------------------------------------- /Prebuilt/Temp/Microsoft.UI.Xaml.pri: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/Prebuilt/Temp/Microsoft.UI.Xaml.pri -------------------------------------------------------------------------------- /Prebuilt/Temp/Microsoft.UI.Xaml.winmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/Prebuilt/Temp/Microsoft.UI.Xaml.winmd -------------------------------------------------------------------------------- /Prebuilt/arm/Microsoft.UI.Xaml.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/Prebuilt/arm/Microsoft.UI.Xaml.dll -------------------------------------------------------------------------------- /Prebuilt/arm/Microsoft.UI.Xaml.pri: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/Prebuilt/arm/Microsoft.UI.Xaml.pri -------------------------------------------------------------------------------- /Prebuilt/arm/Microsoft.UI.Xaml.winmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/Prebuilt/arm/Microsoft.UI.Xaml.winmd -------------------------------------------------------------------------------- /Prebuilt/ffmpeg.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/Prebuilt/ffmpeg.dll -------------------------------------------------------------------------------- /WinGoMapsX.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2042 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinGoMapsX", "WinGoMapsX\WinGoMapsX.csproj", "{FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiveTileTask", "LiveTileTask\LiveTileTask.csproj", "{F5E2423A-05F4-4877-B31D-F3C10DF6082F}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinGoService", "WinGoService\WinGoService.csproj", "{DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Debug|ARM = Debug|ARM 16 | Debug|x64 = Debug|x64 17 | Debug|x86 = Debug|x86 18 | Release|Any CPU = Release|Any CPU 19 | Release|ARM = Release|ARM 20 | Release|x64 = Release|x64 21 | Release|x86 = Release|x86 22 | EndGlobalSection 23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 24 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Debug|Any CPU.ActiveCfg = Debug|x86 25 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Debug|ARM.ActiveCfg = Debug|ARM 26 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Debug|ARM.Build.0 = Debug|ARM 27 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Debug|ARM.Deploy.0 = Debug|ARM 28 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Debug|x64.ActiveCfg = Debug|x64 29 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Debug|x64.Build.0 = Debug|x64 30 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Debug|x64.Deploy.0 = Debug|x64 31 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Debug|x86.ActiveCfg = Debug|x86 32 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Debug|x86.Build.0 = Debug|x86 33 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Debug|x86.Deploy.0 = Debug|x86 34 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Release|Any CPU.ActiveCfg = Release|x86 35 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Release|ARM.ActiveCfg = Release|ARM 36 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Release|ARM.Build.0 = Release|ARM 37 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Release|ARM.Deploy.0 = Release|ARM 38 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Release|x64.ActiveCfg = Release|x64 39 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Release|x64.Build.0 = Release|x64 40 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Release|x64.Deploy.0 = Release|x64 41 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Release|x86.ActiveCfg = Release|x86 42 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Release|x86.Build.0 = Release|x86 43 | {FD6A2942-E4AC-41EC-92DC-52B3A8A43DE8}.Release|x86.Deploy.0 = Release|x86 44 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 45 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Debug|Any CPU.Build.0 = Debug|Any CPU 46 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Debug|ARM.ActiveCfg = Debug|ARM 47 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Debug|ARM.Build.0 = Debug|ARM 48 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Debug|x64.ActiveCfg = Debug|x64 49 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Debug|x64.Build.0 = Debug|x64 50 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Debug|x86.ActiveCfg = Debug|x86 51 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Debug|x86.Build.0 = Debug|x86 52 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Release|Any CPU.ActiveCfg = Release|Any CPU 53 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Release|Any CPU.Build.0 = Release|Any CPU 54 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Release|ARM.ActiveCfg = Release|ARM 55 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Release|ARM.Build.0 = Release|ARM 56 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Release|x64.ActiveCfg = Release|x64 57 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Release|x64.Build.0 = Release|x64 58 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Release|x86.ActiveCfg = Release|x86 59 | {F5E2423A-05F4-4877-B31D-F3C10DF6082F}.Release|x86.Build.0 = Release|x86 60 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 61 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Debug|Any CPU.Build.0 = Debug|Any CPU 62 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Debug|ARM.ActiveCfg = Debug|ARM 63 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Debug|ARM.Build.0 = Debug|ARM 64 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Debug|x64.ActiveCfg = Debug|x64 65 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Debug|x64.Build.0 = Debug|x64 66 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Debug|x86.ActiveCfg = Debug|x86 67 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Debug|x86.Build.0 = Debug|x86 68 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Release|Any CPU.ActiveCfg = Release|Any CPU 69 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Release|Any CPU.Build.0 = Release|Any CPU 70 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Release|ARM.ActiveCfg = Release|ARM 71 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Release|ARM.Build.0 = Release|ARM 72 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Release|x64.ActiveCfg = Release|x64 73 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Release|x64.Build.0 = Release|x64 74 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Release|x86.ActiveCfg = Release|x86 75 | {DF428A8C-75D3-4551-9636-0AE8CB1A0FAD}.Release|x86.Build.0 = Release|x86 76 | EndGlobalSection 77 | GlobalSection(SolutionProperties) = preSolution 78 | HideSolutionNode = FALSE 79 | EndGlobalSection 80 | GlobalSection(ExtensibilityGlobals) = postSolution 81 | SolutionGuid = {F24CECD5-4C59-480E-BD34-AEA5BDFF7BD3} 82 | EndGlobalSection 83 | EndGlobal 84 | -------------------------------------------------------------------------------- /WinGoMapsX/AppCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace WinGoMapsX 5 | { 6 | public class AppCommand : ICommand 7 | { 8 | public event EventHandler CanExecuteChanged; 9 | public static AppCommand GetInstance() 10 | { 11 | return new AppCommand() { CanExecuteFunc = obj => true }; 12 | } 13 | public Predicate CanExecuteFunc 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | public Action ExecuteFunc 20 | { 21 | get; 22 | set; 23 | } 24 | 25 | public bool CanExecute(object parameter) => CanExecuteFunc(parameter); 26 | 27 | public void Execute(object parameter) => ExecuteFunc(parameter); 28 | 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /WinGoMapsX/Assets/BlackLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/BlackLogo.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/BlackLogo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/BlackLogo2.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Branding.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Branding.jpg -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/fork-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/fork-left.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/fork-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/fork-right.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/merge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/merge.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/ramp-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/ramp-left.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/ramp-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/ramp-right.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/roundabout-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/roundabout-left.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/roundabout-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/roundabout-right.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/straight.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/turn-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/turn-left.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/turn-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/turn-right.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/turn-sharp-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/turn-sharp-left.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/turn-sharp-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/turn-sharp-right.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/turn-slight-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/turn-slight-left.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/turn-slight-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/turn-slight-right.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/uturn-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/uturn-left.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/DirectionsIcons/uturn-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/DirectionsIcons/uturn-right.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/LargeTile.scale-125.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/LargeTile.scale-150.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Noise.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Noise3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Noise3.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/SmallTile.scale-125.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/SmallTile.scale-150.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/StoreLogo.backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/StoreLogo.backup.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/StoreLogo.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /WinGoMapsX/Assets/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MahStudio/WinGo-Maps/eeab36636603133c05e239a0349bee44485d9178/WinGoMapsX/Assets/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /WinGoMapsX/ChangeLog.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /WinGoMapsX/Converter/ValueToIsEnabledConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Windows.UI.Xaml.Data; 7 | 8 | namespace WinGoMapsX.Converter 9 | { 10 | class ValueToIsEnabledConverter : IValueConverter 11 | { 12 | public object Convert(object value, Type targetType, object parameter, string language) 13 | { 14 | if (value != null) return true; 15 | else return false; 16 | } 17 | 18 | public object ConvertBack(object value, Type targetType, object parameter, string language) 19 | { 20 | throw new NotImplementedException(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WinGoMapsX/ExtendedSplashScreen.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using System.Threading.Tasks; 7 | using Windows.ApplicationModel.Activation; 8 | using Windows.Foundation; 9 | using Windows.Foundation.Collections; 10 | using Windows.Storage; 11 | using Windows.UI.StartScreen; 12 | using Windows.UI.Xaml; 13 | using Windows.UI.Xaml.Controls; 14 | using Windows.UI.Xaml.Controls.Primitives; 15 | using Windows.UI.Xaml.Data; 16 | using Windows.UI.Xaml.Input; 17 | using Windows.UI.Xaml.Media; 18 | using Windows.UI.Xaml.Navigation; 19 | using WinGoMapsX.ViewModel.PlacesControls; 20 | 21 | // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 22 | 23 | namespace WinGoMapsX 24 | { 25 | /// 26 | /// An empty page that can be used on its own or navigated to within a Frame. 27 | /// 28 | public sealed partial class ExtendedSplashScreen : Page 29 | { 30 | DispatcherTimer DispatcherTime; 31 | object para = null; 32 | public ExtendedSplashScreen(SplashScreen splash, object parameter = null) 33 | { 34 | this.InitializeComponent(); 35 | this.Loaded += ExtendedSplashScreen_Loaded; 36 | para = parameter; 37 | DispatcherTime = new DispatcherTimer 38 | { 39 | Interval = new TimeSpan(0, 0, 20) 40 | }; 41 | DispatcherTime.Tick += DispatcherTime_Tick; 42 | DispatcherTime.Start(); 43 | } 44 | 45 | private async void DispatcherTime_Tick(object sender, object e) 46 | { 47 | await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, RemoveExtendedSplash); 48 | } 49 | void LoadExtendedSplashScreen() 50 | { 51 | InstallVCD(); 52 | UpdateJumpList(); 53 | RemoveExtendedSplash(); 54 | } 55 | public async void InstallVCD() 56 | { 57 | try 58 | { 59 | var r = ApplicationData.Current.LocalSettings.Values["VCDV10"].ToString(); 60 | } 61 | catch (Exception) 62 | { 63 | try 64 | { 65 | var vcdStorageFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///VoiceCommands.xml", UriKind.RelativeOrAbsolute)); 66 | await Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinitionManager.InstallCommandDefinitionsFromStorageFileAsync(vcdStorageFile); 67 | ApplicationData.Current.LocalSettings.Values["VCDV10"] = ""; 68 | } 69 | catch 70 | { 71 | ApplicationData.Current.LocalSettings.Values["VCDV10"] = null; 72 | } 73 | } 74 | } 75 | public async void UpdateJumpList() 76 | { 77 | try 78 | { 79 | var listjump = await JumpList.LoadCurrentAsync(); 80 | listjump.Items.Clear(); 81 | foreach (var Place in SavedPlacesVM.GetSavedPlaces()) 82 | { 83 | listjump.SystemGroupKind = JumpListSystemGroupKind.None; 84 | listjump.Items.Add(JumpListItem.CreateWithArguments($"{Place.Latitude},{Place.Longitude}", Place.PlaceName)); 85 | } 86 | await listjump.SaveAsync(); 87 | } 88 | catch { } 89 | } 90 | private async void ExtendedSplashScreen_Loaded(object sender, RoutedEventArgs e) 91 | { 92 | await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, LoadExtendedSplashScreen); 93 | } 94 | void RemoveExtendedSplash() 95 | { 96 | try 97 | { 98 | DispatcherTime.Stop(); 99 | DispatcherTime.Tick -= DispatcherTime_Tick; 100 | DispatcherTime = null; 101 | Window.Current.Content = new MainPage(para); 102 | Window.Current.Activate(); 103 | } 104 | catch (Exception ex) { throw ex; } 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /WinGoMapsX/Helpers/ClassInfo.cs: -------------------------------------------------------------------------------- 1 | using Windows.ApplicationModel; 2 | using Windows.Foundation.Metadata; 3 | using Windows.Security.ExchangeActiveSyncProvisioning; 4 | using Windows.System.Profile; 5 | 6 | class ClassInfo 7 | { 8 | public enum DeviceTypeEnum 9 | { 10 | Phone = 1, 11 | Tablet = 2, 12 | XBOX = 3 13 | } 14 | 15 | public static DeviceTypeEnum DeviceType() 16 | { 17 | var qualifiers = Windows.ApplicationModel.Resources.Core.ResourceContext.GetForCurrentView().QualifierValues; 18 | if (qualifiers.ContainsKey("DeviceFamily") && qualifiers["DeviceFamily"].ToLower().Contains("xbox")) 19 | { 20 | return DeviceTypeEnum.XBOX; 21 | } 22 | return ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons") 23 | ? DeviceTypeEnum.Phone : DeviceTypeEnum.Tablet; 24 | } 25 | } 26 | 27 | public static class ClassProInfo 28 | { 29 | public static string SystemFamily { get; } 30 | public static string SystemVersion { get; } 31 | public static string SystemArchitecture { get; } 32 | public static string ApplicationName { get; } 33 | public static string ApplicationVersion { get; } 34 | public static string DeviceManufacturer { get; } 35 | public static string DeviceModel { get; } 36 | public static string DeviceID { get; } 37 | 38 | public static bool IsWindowsMobile() 39 | { 40 | if (SystemFamily == "Windows.Mobile") 41 | return true; 42 | else return false; 43 | } 44 | 45 | public static bool IsWindowsDesktop() 46 | { 47 | if (SystemFamily == "Windows.Desktop") 48 | return true; 49 | else return false; 50 | } 51 | 52 | static ClassProInfo() 53 | { 54 | // get the system family name 55 | var ai = AnalyticsInfo.VersionInfo; 56 | SystemFamily = ai.DeviceFamily; 57 | 58 | // get the system version number 59 | string sv = AnalyticsInfo.VersionInfo.DeviceFamilyVersion; 60 | ulong v = ulong.Parse(sv); 61 | ulong v1 = (v & 0xFFFF000000000000L) >> 48; 62 | ulong v2 = (v & 0x0000FFFF00000000L) >> 32; 63 | ulong v3 = (v & 0x00000000FFFF0000L) >> 16; 64 | ulong v4 = (v & 0x000000000000FFFFL); 65 | SystemVersion = $"{v1}.{v2}.{v3}.{v4}"; 66 | 67 | // get the package architecure 68 | var package = Package.Current; 69 | SystemArchitecture = package.Id.Architecture.ToString(); 70 | 71 | // get the user friendly app name 72 | ApplicationName = package.DisplayName; 73 | 74 | // get the app version 75 | PackageVersion pv = package.Id.Version; 76 | ApplicationVersion = $"{pv.Major}.{pv.Minor}.{pv.Build}.{pv.Revision}"; 77 | 78 | // get the device manufacturer and model name 79 | var eas = new EasClientDeviceInformation(); 80 | DeviceManufacturer = eas.SystemManufacturer; 81 | DeviceModel = eas.SystemProductName; 82 | DeviceID = eas.Id.ToString(); 83 | } 84 | } -------------------------------------------------------------------------------- /WinGoMapsX/Helpers/ExtentionMethods.cs: -------------------------------------------------------------------------------- 1 | using GMapsUWP.Directions; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Windows.Devices.Geolocation; 8 | 9 | namespace WinGoMapsX 10 | { 11 | public static class ExtentionMethods 12 | { 13 | public static Dictionary DecodeQueryParameters(this Uri uri) 14 | { 15 | if (uri == null) 16 | throw new ArgumentNullException("uri"); 17 | 18 | if (uri.Query.Length == 0) 19 | return new Dictionary(); 20 | 21 | return uri.Query.TrimStart('?') 22 | .Split(new[] { '&', ';' }, StringSplitOptions.RemoveEmptyEntries) 23 | .Select(parameter => parameter.Split(new[] { '=' }, StringSplitOptions.RemoveEmptyEntries)) 24 | .GroupBy(parts => parts[0], 25 | parts => parts.Length > 2 ? string.Join("=", parts, 1, parts.Length - 1) : (parts.Length > 1 ? parts[1] : "")) 26 | .ToDictionary(grouping => grouping.Key, 27 | grouping => string.Join(",", grouping)); 28 | } 29 | 30 | public static double DistanceFromRoute(this Geopoint UserLocation, DirectionsHelper.Step CurrentStep) 31 | { 32 | //Y2,Y1 , X2,X1 points of the line, X0, Y0 user one 33 | //Latitude = Y, Longitude = X 34 | var Y0 = UserLocation.Position.Latitude; 35 | var X0 = UserLocation.Position.Longitude; 36 | var Y1 = CurrentStep.StartLocation.Latitude; 37 | var Y2 = CurrentStep.EndLocation.Latitude; 38 | var X1 = CurrentStep.StartLocation.Longitude; 39 | var X2 = CurrentStep.EndLocation.Longitude; 40 | var a = ((Y2 - Y1) * X0) - ((X2 - X1) * Y0) + (X2 * Y1) - (Y2 * X1); 41 | if (a < 0) a = -1 * a; 42 | var b = Math.Sqrt((Math.Pow((Y2 - Y1), 2) + Math.Pow((X2 - X1), 2))); 43 | var dist = ((a / b)); 44 | dist = dist * 60 * 1.1515; 45 | return dist * 1.609344; // Return kilometer 46 | } 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /WinGoMapsX/Helpers/GeoLocatorHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Windows.ApplicationModel.ExtendedExecution; 3 | using Windows.Devices.Geolocation; 4 | using Windows.Foundation; 5 | using Windows.System; 6 | using Windows.UI.Core; 7 | using Windows.UI.Popups; 8 | using Windows.UI.Xaml; 9 | 10 | class GeoLocatorHelper 11 | { 12 | public static event EventHandler LocationFetched; 13 | public static event EventHandler LocationChanged; 14 | public static bool IsLocationBusy { get; set; } 15 | private static ExtendedExecutionSession session; 16 | public static Geolocator Geolocator = new Geolocator() { DesiredAccuracy = PositionAccuracy.High, ReportInterval = 500 }; 17 | 18 | private static async void StartLocationExtensionSession() 19 | { 20 | try 21 | { 22 | session = new ExtendedExecutionSession(); 23 | session.Description = "Location Tracker"; 24 | session.Reason = ExtendedExecutionReason.LocationTracking; 25 | var result = await session.RequestExtensionAsync(); 26 | if (result == ExtendedExecutionResult.Denied) 27 | { 28 | //TODO: handle denied 29 | session.Revoked += new TypedEventHandler(ExtendedExecutionSession_Revoked); 30 | } 31 | } 32 | catch { } 33 | } 34 | 35 | private static void ExtendedExecutionSession_Revoked(object sender, ExtendedExecutionRevokedEventArgs args) 36 | { 37 | try 38 | { 39 | if (session != null) 40 | { 41 | session.Dispose(); 42 | session = null; 43 | } 44 | } 45 | catch { } 46 | } 47 | 48 | static GeoLocatorHelper() 49 | { 50 | IsLocationBusy = false; 51 | StartLocationExtensionSession(); 52 | GetUserLocation(); 53 | } 54 | 55 | public static async void GetUserLocation() 56 | { 57 | try 58 | { 59 | if (IsLocationBusy) return; 60 | IsLocationBusy = true; 61 | var access = await Geolocator.RequestAccessAsync(); 62 | if (access != GeolocationAccessStatus.Allowed) 63 | { 64 | var msg = new MessageDialog(MultilingualHelpToolkit.GetString("StringLocationPrivacy", "Text")); 65 | msg.Commands.Add(new UICommand(MultilingualHelpToolkit.GetString("StringOK", "Text"), async delegate 66 | { 67 | await Launcher.LaunchUriAsync(new Uri("ms-settings:privacy-location", UriKind.RelativeOrAbsolute)); 68 | Window.Current.Activated += Current_Activated; 69 | })); 70 | msg.Commands.Add(new UICommand(MultilingualHelpToolkit.GetString("StringCancel", "Text"), delegate { })); 71 | var a = await msg.ShowAsync(); 72 | } 73 | Geolocator.PositionChanged += Geolocator_PositionChanged; 74 | Geolocator.StatusChanged += GeoLocate_StatusChanged; 75 | var res = Geolocator.GetGeopositionAsync(); 76 | if (res != null) 77 | res.Completed += new AsyncOperationCompletedHandler(LocationGetComplete); 78 | IsLocationBusy = false; 79 | } 80 | catch { } 81 | } 82 | 83 | private static void Current_Activated(object sender, WindowActivatedEventArgs e) 84 | { 85 | if (e.WindowActivationState == CoreWindowActivationState.CodeActivated) 86 | { 87 | Window.Current.Activated -= Current_Activated; 88 | 89 | GetUserLocation(); 90 | } 91 | } 92 | 93 | private static void Geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args) 94 | { 95 | try 96 | { 97 | LocationChanged?.Invoke(null, args.Position.Coordinate); 98 | } 99 | catch (Exception ex) { } 100 | } 101 | 102 | private static void GeoLocate_StatusChanged(Geolocator sender, StatusChangedEventArgs args) 103 | { 104 | if (args.Status == PositionStatus.NoData || args.Status == PositionStatus.NotAvailable) 105 | { 106 | GetUserLocation(); 107 | } 108 | } 109 | 110 | private static void LocationGetComplete(IAsyncOperation asyncInfo, AsyncStatus asyncStatus) 111 | { 112 | try 113 | { 114 | var res = asyncInfo.GetResults(); 115 | LocationFetched?.Invoke(null, res); 116 | //LocationChanged?.Invoke(null, res.Coordinate); 117 | IsLocationBusy = false; 118 | } 119 | catch 120 | { 121 | } 122 | } 123 | 124 | } 125 | -------------------------------------------------------------------------------- /WinGoMapsX/Helpers/InternalHelper.cs: -------------------------------------------------------------------------------- 1 | using Windows.Networking.Connectivity; 2 | 3 | class InternalHelper 4 | { 5 | public static bool InternetConnection() 6 | { 7 | ConnectionProfile connections = NetworkInformation.GetInternetConnectionProfile(); 8 | if (connections != null && connections.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess) 9 | return true; 10 | else return false; 11 | } 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /WinGoMapsX/Helpers/MultilingualHelpToolkit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Windows.UI.Xaml; 3 | 4 | 5 | class MultilingualHelpToolkit 6 | { 7 | //GetString("LanguageOptionsSubTitle","Text")l 8 | public static string GetString(string Title, string Property) 9 | { 10 | Windows.ApplicationModel.Resources.ResourceLoader loader = Windows.ApplicationModel.Resources.ResourceLoader.GetForCurrentView(); 11 | var expected = loader.GetString(Title + "/" + Property); 12 | if (expected.Contains(@"\n")) 13 | expected = expected.Replace(@"\n", Environment.NewLine); 14 | return expected; 15 | } 16 | 17 | public FlowDirection GetObjectFlowDirection(string Title) 18 | { 19 | Windows.ApplicationModel.Resources.ResourceLoader loader = Windows.ApplicationModel.Resources.ResourceLoader.GetForCurrentView(); 20 | var expected = loader.GetString(Title + "/FlowDirection"); 21 | if (expected.StartsWith("R") || expected.StartsWith("r")) 22 | return FlowDirection.RightToLeft; 23 | else return FlowDirection.LeftToRight; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /WinGoMapsX/Helpers/TileCoordinateHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Windows.Devices.Geolocation; 7 | 8 | public class TileCoordinate 9 | { 10 | public TileCoordinate(double lat, double lon, int zoom) 11 | { 12 | this.lat = lat; 13 | this.lon = lon; 14 | this.zoom = zoom; 15 | } 16 | public double y; 17 | public double x; 18 | public double lat; 19 | public double lon; 20 | public int zoom; 21 | public bool locationCoord() 22 | { 23 | if (Math.Abs(this.lat) > 85.0511287798066) 24 | return false; 25 | double sin_phi = Math.Sin(this.lat * Math.PI / 180); 26 | double norm_x = this.lon / 180; 27 | double norm_y = (0.5 * Math.Log((1 + sin_phi) / (1 - sin_phi))) / Math.PI; 28 | this.y = Math.Pow(2, this.zoom) * ((1 - norm_y) / 2); 29 | this.x = Math.Pow(2, this.zoom) * ((norm_x + 1) / 2); 30 | return true; 31 | } 32 | 33 | public static BasicGeoposition ReverseGeoPoint(double x, double y, double z) 34 | { 35 | var Lng = 180 * ((2 * x) / (Math.Pow(2, z)) - 1); 36 | var Lat = (180 / Math.PI) * 37 | Math.Asin((Math.Pow(Math.E, (2 * Math.PI * (1 - ((2 * y) / Math.Pow(2, z))))) - 1) 38 | / (1 + Math.Pow(Math.E, (2 * Math.PI * (1 - ((2 * y) / Math.Pow(2, z))))))); 39 | return new BasicGeoposition() { Latitude = Lat, Longitude = Lng }; 40 | 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /WinGoMapsX/MainPage.DeviceFamily-Mobile.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 37 | 47 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /WinGoMapsX/View/DirectionsControls/NewDirections.xaml: -------------------------------------------------------------------------------- 1 |  12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 39 | 49 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /WinGoMapsX/View/DirectionsControls/NewDirections.xaml.cs: -------------------------------------------------------------------------------- 1 | using GMapsUWP.Directions; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using Windows.Devices.Geolocation; 6 | using Windows.UI; 7 | using Windows.UI.Popups; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Maps; 11 | using Windows.UI.Xaml.Media; 12 | using WinGoMapsX.Helpers; 13 | using WinGoMapsX.ViewModel.SettingsView; 14 | 15 | // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236 16 | 17 | namespace WinGoMapsX.View.DirectionsControls 18 | { 19 | public sealed partial class NewDirections : UserControl 20 | { 21 | public Geopoint Origin { get; set; } 22 | public Geopoint Destination { get; set; } 23 | public List Waypoints { get; set; } 24 | 25 | DirectionsHelper.DirectionModes Mode = DirectionsHelper.DirectionModes.walking; 26 | 27 | public MapControl Map { get; set; } 28 | public StepsTitleProvider StepsTitleProvider { get; set; } 29 | public NewDirections() 30 | { 31 | this.InitializeComponent(); 32 | this.Loaded += NewDirections_Loaded; 33 | Waypoints = new List(); 34 | } 35 | 36 | private void NewDirections_Loaded(object sender, RoutedEventArgs e) 37 | { 38 | var c = (Color)Resources["SystemControlBackgroundAccentBrush"]; 39 | WalkBTN.Foreground = new SolidColorBrush(c); 40 | Mode = DirectionsHelper.DirectionModes.walking; 41 | } 42 | 43 | private async void NavMode_Click(object sender, RoutedEventArgs e) 44 | { 45 | #region Setting background / foreground / mode 46 | SolidColorBrush bg; 47 | if (Mode != DirectionsHelper.DirectionModes.walking) 48 | { 49 | bg = WalkBTN.Foreground as SolidColorBrush; 50 | } 51 | else 52 | { 53 | bg = DriveBTN.Foreground as SolidColorBrush; 54 | } 55 | WalkBTN.Foreground = bg; 56 | DriveBTN.Foreground = bg; 57 | TransitBTN.Foreground = bg; 58 | var c = (Color)Resources["SystemControlBackgroundAccentBrush"]; 59 | (sender as Button).Foreground = new SolidColorBrush(c); 60 | switch ((sender as Button).Name) 61 | { 62 | case "WalkBTN": 63 | Mode = DirectionsHelper.DirectionModes.walking; 64 | break; 65 | case "DriveBTN": 66 | Mode = DirectionsHelper.DirectionModes.driving; 67 | break; 68 | case "TransitBTN": 69 | Mode = DirectionsHelper.DirectionModes.transit; 70 | break; 71 | default: 72 | break; 73 | } 74 | #endregion 75 | 76 | if (Destination == null || Origin == null) return; 77 | await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, DirectionFinder); 78 | } 79 | public async void DirectionFinder() 80 | { 81 | MapPolyline CurrentDrawed = null; 82 | try 83 | { 84 | foreach (var item in Map.MapElements) 85 | { 86 | if (item.GetType() == typeof(MapPolyline)) 87 | CurrentDrawed = (MapPolyline)item; 88 | } 89 | } 90 | catch { } 91 | 92 | if (Destination == null) return; 93 | await VoiceNavigationHelper.ReadText("calculating route"); 94 | var r = await DirectionsHelper.GetDirections(Origin.Position, Destination.Position, Mode, Waypoints); 95 | 96 | if (r == null) { await new MessageDialog(MultilingualHelpToolkit.GetString("StringNoWayToDestination", "Text")).ShowAsync(); return; } 97 | if (r.Status == "OVER_QUERY_LIMIT") { await new MessageDialog("OVER_QUERY_LIMIT").ShowAsync(); return; } 98 | 99 | if (CurrentDrawed != null) 100 | Map.MapElements.Remove(CurrentDrawed); 101 | 102 | var polyline = DirectionsHelper.GetDirectionAsRoute(r.Routes.FirstOrDefault(), (Color)Resources["SystemControlBackgroundAccentBrush"]); 103 | Map.MapElements.Add(polyline); 104 | 105 | new VoiceNavigationHelper(r.Routes.FirstOrDefault()); 106 | StepsTitleProvider.SetRoute(r.Routes.FirstOrDefault()); 107 | 108 | var distance = GetDistance(r.Routes.FirstOrDefault()); 109 | var estime = DirectionsHelper.GetTotalEstimatedTime(r.Routes.FirstOrDefault()); 110 | await new MessageDialog($"distance : {distance} estimated time : {estime}").ShowAsync(); 111 | } 112 | 113 | public static string GetDistance(DirectionsHelper.Route Route) 114 | { 115 | var Distance = 0; 116 | foreach (var item in Route.Legs) 117 | { 118 | Distance += item.Distance.Value; 119 | } 120 | if (SettingsSetters.GetLengthUnit() == 0) 121 | { 122 | //Metric 123 | if (Distance <= 2000) 124 | return $"{Distance} {MultilingualHelpToolkit.GetString("StringMeters", "Text")}"; 125 | else return $"{Distance / 1000f} {MultilingualHelpToolkit.GetString("StringKiloMeters", "Text")}"; 126 | } 127 | else if (SettingsSetters.GetLengthUnit() == 1) 128 | { 129 | //Imperial 130 | if (Distance <= 2000) 131 | return $"{string.Format("{0:0.00}", Distance * 1.093613f)} {MultilingualHelpToolkit.GetString("StringYards", "Text")}"; 132 | else return $"{string.Format("{0:0.00}", Distance * 0.000621371f)} {MultilingualHelpToolkit.GetString("StringMiles", "Text")}"; 133 | } 134 | else 135 | { 136 | //US 137 | if (Distance <= 2000) 138 | return $"{string.Format("{0:0.00}", Distance * 3.28084f)} {MultilingualHelpToolkit.GetString("StringFeet", "Text")}"; 139 | else return $"{string.Format("{0:0.00}", Distance * 0.000621371f)} {MultilingualHelpToolkit.GetString("StringMiles", "Text")}"; 140 | } 141 | } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /WinGoMapsX/View/DirectionsControls/StepsTitleProvider.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /WinGoMapsX/View/OnMapControls/ChangeViewUserControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Maps; 11 | using Windows.UI.Xaml.Controls.Primitives; 12 | using Windows.UI.Xaml.Data; 13 | using Windows.UI.Xaml.Input; 14 | using Windows.UI.Xaml.Media; 15 | using Windows.UI.Xaml.Navigation; 16 | 17 | // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236 18 | 19 | namespace WinGoMapsX.View.OnMapControls 20 | { 21 | public sealed partial class ChangeViewUserControl : UserControl 22 | { 23 | public MapControl Map { set => ChangeViewUCVM.Map = value; } 24 | public ChangeViewUserControl() 25 | { 26 | this.InitializeComponent(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /WinGoMapsX/View/OnMapControls/MyLocationUserControl.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 |