protected override void OnCreate(Android.OS.Bundle savedInstanceState) { base.OnCreate(savedInstanceState); ContentView = new BaseMapsView(this); SetContentView(ContentView); Title = "Base maps"; // Zoom to Central Europe so some texts would be visible MapPos europe = MapView.Options.BaseProjection.FromWgs84(new MapPos(15.2551, 54.5260)); MapView.SetFocusPos(europe, 0); MapView.Zoom = 5; Alert("Click the menu to choose between different styles and languages"); ContentView.Menu.Items = Sections.List; // Set initial style ContentView.Menu.SetInitialItem(Sections.Nutiteq); ContentView.Menu.SetInitialItem(Sections.Language); UpdateBaseLayer(Sections.Nutiteq, Sections.BaseStyleValue); UpdateLanguage(Sections.BaseLanguageCode); }
protected override void OnCreate(Android.OS.Bundle savedInstanceState) { base.OnCreate(savedInstanceState); ContentView = new BaseMapsView(this); SetContentView(ContentView); Title = GetType().GetTitle(); ActionBar.Subtitle = GetType().GetDescription(); // Zoom to Central Europe so some texts would be visible MapPos europe = MapView.Options.BaseProjection.FromWgs84(new MapPos(15.2551, 54.5260)); MapView.SetFocusPos(europe, 0); MapView.Zoom = 5; ContentView.CurrentLayer = ContentView.AddBaseLayer(CartoBaseMapStyle.CartoBasemapStyleVoyager); ContentView.StyleContent.HighlightDefault(); ContentView.LanguageContent.Adapter.Languages = Languages.List; ContentView.LanguageContent.Adapter.NotifyDataSetChanged(); }