コード例 #1
0
		public override void LoadView ()
		{
			base.LoadView ();
			
			var camera = CameraPosition.FromCamera (latitude: 30.2652898, 
			                                        longitude: -97.7386826, 
			                                        zoom: 17,
			                                        bearing: 15,
			                                        viewingAngle: 15);
			mapView = MapView.FromCamera (View.Bounds, camera);
			mapView.MapType = MapViewType.Normal;
			mapView.MyLocationEnabled = true;
			//mapView.Frame = View.Frame;

			var hiltonOptions = new MarkerOptions();

			hiltonOptions.Position = new MonoTouch.CoreLocation.CLLocationCoordinate2D(30.2652898, -97.7386826);
			hiltonOptions.Title = "Evolve 2013";
			hiltonOptions.Snippet = "Austin, TX";
			mapView.AddMarker(hiltonOptions);

			View.Add (mapView);

			satelliteSwitch = new UISwitch ();
			satelliteSwitch.Frame = new RectangleF(11.0f, 11.0f, satelliteSwitch.Frame.Width, satelliteSwitch.Frame.Height);
			satelliteSwitch.On = false;
			View.Add (satelliteSwitch);

			currentLocNow = UIButton.FromType (UIButtonType.RoundedRect);
			currentLocNow.Frame = new RectangleF(50, 100, 100, 20);
			currentLocNow.Center = new PointF (View.Frame.Width/2, View.Frame.Height - 20.0f);
			currentLocNow.SetTitle ("ShowMyLoc", UIControlState.Normal);
			View.AddSubview (currentLocNow);
		}
コード例 #2
0
ファイル: extras.cs プロジェクト: kbystky/monotouch-bindings
 public Marker AddMarker(MarkerOptions options)
 {
     return(new Marker(InternalAddMarker(options)));
 }
コード例 #3
0
ファイル: extras.cs プロジェクト: svrooij/monotouch-bindings
 public Marker AddMarker(MarkerOptions options)
 {
     return new Marker (InternalAddMarker (options));
 }