void OpenStreetView(UIAlertAction action) { var panoramaService = new PanoramaService(); var location = new CoreLocation.CLLocationCoordinate2D(viewModel.Place.Geometry.Location.Latitude, viewModel.Place.Geometry.Location.Longitude); panoramaService.RequestPanorama(location, PanoramaRequestCallback); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); //先初始化BMapManager DemoApplication app = (DemoApplication)this.Application; if (app.mBMapManager == null) { app.mBMapManager = new BMapManager(this); app.mBMapManager.Init( new DemoApplication.MyGeneralListener()); } SetContentView(Resource.Layout.activity_panorama_main); mPanoramaView = FindViewById<PanoramaView>(Resource.Id.panorama); //UI初始化 mBtn = FindViewById<Button>(Resource.Id.button); mBtn.Visibility = ViewStates.Invisible; //道路名 mRoadName = FindViewById<TextView>(Resource.Id.road); mRoadName.Visibility = ViewStates.Visible; mRoadName.Text = "百度全景"; mRoadName.SetBackgroundColor(Color.Argb(200, 5, 5, 5)); //背景透明度 mRoadName.SetTextColor(Color.Argb(255, 250, 250, 250)); //文字透明度 mRoadName.TextSize = 22; //跳转进度条 pd = new ProgressDialog(this); pd.SetMessage("跳转中……"); pd.SetCancelable(true);//设置进度条是否可以按退回键取消 //初始化Searvice mService = PanoramaService.GetInstance(ApplicationContext); mCallback = new IPanoramaServiceCallbackImpl(this); //设置全景图监听 mPanoramaView.SetPanoramaViewListener(this); //解析输入 ParseInput(); }
void OpenStreetView (UIAlertAction action) { var panoramaService = new PanoramaService (); var location = new CoreLocation.CLLocationCoordinate2D (viewModel.Place.Geometry.Location.Latitude, viewModel.Place.Geometry.Location.Longitude); panoramaService.RequestPanorama (location, PanoramaRequestCallback); }