protected override void OnCreate(Android.OS.Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_main); Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); // Hack to tell the platform independent samples where the files can be found on Android. MbTilesSample.MbTilesLocation = MbTilesLocationOnAndroid; MbTilesHelper.DeployMbTilesFile(s => File.Create(System.IO.Path.Combine(MbTilesLocationOnAndroid, s))); _mapControl = FindViewById <MapControl>(Resource.Id.mapcontrol); _mapControl.Map = MbTilesSample.CreateMap(); _mapControl.Info += MapOnInfo; _mapControl.Map.RotationLock = true; _mapControl.UnSnapRotationDegrees = 30; _mapControl.ReSnapRotationDegrees = 5; _mapControl.Renderer.WidgetRenders[typeof(CustomWidget.CustomWidget)] = new CustomWidgetSkiaRenderer(); FindViewById <RelativeLayout>(Resource.Id.mainLayout).AddView(_popup = CreatePopup()); _mapControl.Map.Layers.Clear(); var sample = new MbTilesOverlaySample(); sample.Setup(_mapControl); //_mapControl.Info += MapControlOnInfo; //LayerList.Initialize(_mapControl.Map.Layers); }
public override void ViewDidLoad() { base.ViewDidLoad(); // Hack to tell the platform independent samples where the files can be found on iOS. MbTilesSample.MbTilesLocation = MbTilesLocationOnIos; // Never tested this. PDD. MbTilesHelper.DeployMbTilesFile(s => File.Create(Path.Combine(MbTilesLocationOnIos, s))); View = CreateMap(View.Bounds); }
public override void DidFinishLaunching(NSNotification notification) { // Hack to tell the platform independent samples where the files can be found on iOS. MbTilesSample.MbTilesLocation = MbTilesLocationOnMac; // Never tested this. PDD. MbTilesHelper.DeployMbTilesFile(s => File.Create(Path.Combine(MbTilesLocationOnMac, s))); Xamarin.Forms.Forms.Init(); LoadApplication(new App()); base.DidFinishLaunching(notification); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; MbTilesSample.MbTilesLocation = MbTilesLocationOnAndroid; MbTilesHelper.DeployMbTilesFile(s => File.Create(System.IO.Path.Combine(MbTilesLocationOnAndroid, s))); base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App()); }
public MainWindow() { InitializeComponent(); Xamarin.Forms.Forms.Init(); // Hack to tell the platform independent samples where the files can be found on iOS. MbTilesSample.MbTilesLocation = MbTilesLocationOnWPF; // Never tested this. PDD. MbTilesHelper.DeployMbTilesFile(s => File.Create(System.IO.Path.Combine(MbTilesLocationOnWPF, s))); LoadApplication(new Mapsui.Samples.Forms.App()); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); // Hack to tell the platform independent samples where the files can be found on iOS. MbTilesSample.MbTilesLocation = MbTilesLocationOnIos; // Never tested this. PDD. MbTilesHelper.DeployMbTilesFile(s => File.Create(Path.Combine(MbTilesLocationOnIos, s))); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { Plugin.CurrentActivity.CrossCurrentActivity.Current.Activity = this; TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; MbTilesSample.MbTilesLocation = MbTilesLocationOnAndroid; MbTilesHelper.DeployMbTilesFile(s => File.Create(System.IO.Path.Combine(MbTilesLocationOnAndroid, s))); base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new Mapsui.Samples.Forms.App()); }
public MainPage() { InitializeComponent(); // Hack to tell the platform independent samples where the files can be found on Android. MbTilesSample.MbTilesLocation = MbTilesLocationOnUwp; MbTilesHelper.DeployMbTilesFile(s => File.Create(Path.Combine(MbTilesLocationOnUwp, s))); MapControl.Map.Layers.Add(OpenStreetMap.CreateTileLayer()); MapControl.RotationLock = false; MapControl.UnSnapRotationDegrees = 30; MapControl.ReSnapRotationDegrees = 5; FillComboBoxWithDemoSamples(); SampleSet.SelectionChanged += SampleSet_SelectionChanged; }
public MainPage() { InitializeComponent(); // Hack to tell the platform independent samples where the files can be found on Android. MbTilesSample.MbTilesLocation = MbTilesLocationOnUwp; MbTilesHelper.DeployMbTilesFile(s => File.Create(Path.Combine(MbTilesLocationOnUwp, s))); MapControl.Map !.Layers.Add(OpenStreetMap.CreateTileLayer()); MapControl.Map !.RotationLock = false; MapControl.UnSnapRotationDegrees = 30; MapControl.ReSnapRotationDegrees = 5; MapControl.Renderer.WidgetRenders[typeof(CustomWidget.CustomWidget)] = new CustomWidgetSkiaRenderer(); CategoryComboBox.SelectionChanged += CategoryComboBoxSelectionChanged; FillComboBoxWithCategories(); FillListWithSamples(); }
protected override void OnCreate(global::Android.OS.Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); // Hack to tell the platform independent samples where the files can be found on Android. MbTilesSample.MbTilesLocation = MbTilesLocationOnAndroid; MbTilesHelper.DeployMbTilesFile(s => File.Create(Path.Combine(MbTilesLocationOnAndroid, s))); _mapControl = FindViewById <MapControl>(Resource.Id.mapcontrol); _mapControl.Map = InfoLayersSample.CreateMap(); _mapControl.Map.Info += MapOnInfo; _mapControl.Map.Viewport.ViewportChanged += ViewportOnViewportChanged; _mapControl.RotationLock = false; _mapControl.UnSnapRotationDegrees = 30; _mapControl.ReSnapRotationDegrees = 5; FindViewById <RelativeLayout>(Resource.Id.mainLayout).AddView(_popup = CreatePopup()); }
private void InitializeComponent() { AvaloniaXamlLoader.Load(this); // Hack to tell the platform independent samples where the files can be found on Android. MbTilesSample.MbTilesLocation = MbTilesLocationOnAvalonia; MbTilesHelper.DeployMbTilesFile(s => File.Create(Path.Combine(MbTilesLocationOnAvalonia, s))); MapControl.Map !.Layers.Add(OpenStreetMap.CreateTileLayer()); MapControl.Map.RotationLock = false; MapControl.UnSnapRotationDegrees = 30; MapControl.ReSnapRotationDegrees = 5; MapControl.Renderer.WidgetRenders[typeof(CustomWidget.CustomWidget)] = new CustomWidgetSkiaRenderer(); RotationSlider.PointerMoved += RotationSliderOnPointerMoved; CategoryComboBox.SelectionChanged += CategoryComboBoxSelectionChanged; FillComboBoxWithCategories(); FillListWithSamples(); }
protected override void OnCreate(Android.OS.Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_main); Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); // Hack to tell the platform independent samples where the files can be found on Android. MbTilesSample.MbTilesLocation = MbTilesLocationOnAndroid; MbTilesHelper.DeployMbTilesFile(s => File.Create(System.IO.Path.Combine(MbTilesLocationOnAndroid, s))); _mapControl = FindViewById <MapControl>(Resource.Id.mapcontrol); _mapControl.Map = InfoLayersSample.CreateMap(); _mapControl.Info += MapOnInfo; _mapControl.RotationLock = false; _mapControl.UnSnapRotationDegrees = 30; _mapControl.ReSnapRotationDegrees = 5; FindViewById <RelativeLayout>(Resource.Id.mainLayout).AddView(_popup = CreatePopup()); }