/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used when the application is launched to open a specific file, to display /// search results, and so forth. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected async override void OnLaunched(LaunchActivatedEventArgs e) { if (mPage == null) { Nutiteq.Utils.Log.ShowDebug = true; Nutiteq.Utils.Log.ShowInfo = true; Nutiteq.Utils.Log.ShowError = true; // Register Nutiteq app license var licenseOk = Nutiteq.Ui.MapView.RegisterLicense("XTUMwQ0ZRQ0F5OWt6Sk5qcFlVZk5LSXJ3bGh6YnZ3cnpEd0lVSXE1M3dDVUl1MHR3amZROGNDRmJwQWN5dUVRPQoKcHJvZHVjdHM9c2RrLXhhbWFyaW4taW9zLTMuKixzZGsteGFtYXJpbi1hbmRyb2lkLTMuKixzZGstZ2lzZXh0ZW5zaW9uLHNkay13aW5waG9uZS0zLioKcGFja2FnZU5hbWU9Y29tLm51dGl0ZXEuaGVsbG9tYXAueGFtYXJpbgpidW5kbGVJZGVudGlmaWVyPWNvbS5udXRpdGVxLmhlbGxvbWFwLnhhbWFyaW4KcHJvZHVjdElkPWM4ODJkMzhhLTVjMDktNDk5NC04N2YwLTg5ODc1Y2RlZTUzOQp3YXRlcm1hcms9bnV0aXRlcQp2YWxpZFVudGlsPTIwMTUtMDktMDEKdXNlcktleT0yYTllOWY3NDYyY2VmNDgxYmUyYThjMTI2MWZlNmNiZAo="); // Get asset folder for mbtiles file var importPackageName = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, "Assets\\world_ntvt_0_4.mbtiles"); // Create folder for packages await Windows.Storage.ApplicationData.Current.LocalFolder.CreateFolderAsync("packages", Windows.Storage.CreationCollisionOption.OpenIfExists); var packageFolder = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "packages"); // Create map view and initialize (actual initialization code is shared between Android/iOS/WinPhone platforms) mPage = new Nutiteq.Ui.MapView(); NutiteqSample.MapSetup.InitializePackageManager(packageFolder, importPackageName, mPage, "EE"); NutiteqSample.MapSetup.AddMapOverlays(mPage); } // Place the page in the current window and ensure that it is active. Windows.UI.Xaml.Window.Current.Content = mPage; Windows.UI.Xaml.Window.Current.Activate(); }
void ReleaseDesignerOutlets() { if (Map != null) { Map.Dispose(); Map = null; } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Test_Map); var mapLoader = Mvx.Resolve <Core.Services.IMapService>(); Nutiteq.Ui.MapView mapViewer = (Nutiteq.Ui.MapView)FindViewById(Resource.Id.mapViewer); mapLoader.LoadNutiteqMap(mapViewer); }