/// <summary> /// Reload map overviews /// </summary> private MapOverview LoadOverview(int level) { String mapFile = World.GetMapFirstFile(level); overviewIndex = level; overview = Map.GetMapOverview(mapFile); levelParts = World.GetMaps(level); return(overview); }
private bool centerMapToPosition(double Latitude, double Longitude, double ScaleKilometers) { bool result = false; try { MainThread.BeginInvokeOnMainThread(() => { MapOverview.MoveToRegion(MapSpan.FromCenterAndRadius(new Xamarin.Forms.Maps.Position(Latitude, Longitude), Distance.FromKilometers(ScaleKilometers))); }); result = true; } catch (Exception exception) { var properties = new Dictionary <string, string> { { "Action", "centerMapToPosition" } }; Crashes.TrackError(exception, properties); } return(result); }
public LoadingScreen(MapOverview overview, TheGreatPaperGame Game) { this.Initialize(); this.Game = Game; loading1 = new Rectangle(0, 356, 270, 178); loading2 = new Rectangle(0, 178, 270, 178); loading3 = new Rectangle(0, 0, 270, 178); currentloading = loading1; background = new Rectangle(300, 0, 1024, 768); backgroundDst = background; backgroundDst.X = 0; backgroundDst.Y = 0; backgroundDst.Width = TGPAContext.Instance.ScreenWidth; backgroundDst.Height = TGPAContext.Instance.ScreenHeight; this.overview = overview; this.previewBG1 = null; this.previewBG1Fadeout = 0.0f; this.previewBG2 = null; this.previewBG2Fadeout = 0.0f; this.IsLoaded = false; }