//set up the google map void SetUpGoogleMap() { if (!CommonHelperClass.FnIsConnected(this)) { Toast.MakeText(this, Constants.strNoInternet, ToastLength.Short).Show(); return; } mSuppMapFragment = (SupportMapFragment)SupportFragmentManager.FindFragmentById(Resource.Id.map); var mapReadyCallback = new OnMapReadyClass(); mapReadyCallback.MapReadyAction += delegate(GoogleMap map) { mGoogleMap = map; UpdateCameraPosition(new LatLng(42.697708, 23.321802), 10); map.SetInfoWindowAdapter(this); }; mSuppMapFragment.GetMapAsync(mapReadyCallback); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); if (!CommonHelperClass.FnIsGooglePlayServicesInstalled(this)) { Finish(); } // Set our view from the "closest_stop_layout" layout resource SetContentView(Resource.Layout.closest_stop_layout); SetUpGoogleMap(); mToolbar = FindViewById <V7Toolbar>(Resource.Id.toolbar); SetSupportActionBar(mToolbar); SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_menu); SupportActionBar.SetDisplayHomeAsUpEnabled(true); mDrawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout); mNavigationView = FindViewById <NavigationView>(Resource.Id.nav_view); mNavigationView.SetNavigationItemSelectedListener(this); mMenuFAB = (FloatingActionMenu)FindViewById(Resource.Id.menu); mMenuFAB.HideMenuButton(false); mMenuFAB.PostDelayed(() => mMenuFAB.ShowMenuButton(true), -200); mGetPositionFAB = (FloatingActionButton)FindViewById(Resource.Id.position_fab); mDrawRouteFAB = (FloatingActionButton)FindViewById(Resource.Id.route_fab); mDB = new Database(Path.Combine(mPath, mDbName)); mListAllStations = mDB.AllStationsLocations(); mAllLinesId = mDB.AllLinesID(); mListLinesIdFromStation = new List <string>(); }