public SizingIndexedSource(SKMapUtilOfflineMapSearchViewController parent) : base(parent) { this.parent = parent; }
protected void LoadSections() { this.Root.Clear (); List<Section> sections = new List<Section> (10); sections.Add (new Section ("Browse Available Maps") { new StyledStringElement("Browse Continents", () => { SKMapUtilOfflineMapInfoViewController vc = new SKMapUtilOfflineMapInfoViewController(OfflineMapInfo.World); this.NavigationController.PushViewController(vc, true); }), new StyledStringElement("Search Countries/States", () => { SKMapUtilOfflineMapSearchViewController vc = new SKMapUtilOfflineMapSearchViewController((OfflineMapInfo.PackageType packageType) => { return packageType != OfflineMapInfo.PackageType.City; }); this.NavigationController.PushViewController(vc, true); }), new StyledStringElement("Search Cities", () => { SKMapUtilOfflineMapSearchViewController vc = new SKMapUtilOfflineMapSearchViewController((OfflineMapInfo.PackageType packageType) => { return packageType == OfflineMapInfo.PackageType.City; }); this.NavigationController.PushViewController(vc, true); }), }); // TODO: Drive based on location from device... CLLocationCoordinate2D nearby = new CLLocationCoordinate2D (0, -80); this._nearbyMapsSection = new NearbyOfflineMapsSection (this, nearby); this._installedMapsSection = new InstalledMapsSection (this); sections.Add( this._nearbyMapsSection ); sections.Add (this._installedMapsSection); this.Root.Add (sections); }