public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            GMSCamera camera = new GMSCamera(-33.8683, 151.2086, 6);
            mapView = new GMSMapView{Camera =  camera};
            mapView.MyLocationEnabled = true ;
            this.View = mapView;

            var xamarinhq = new GMSMarkerOptions {
                Title = "Xamarin HQ",
                Snippet = "Where the magic happens.",
                Position = new CLLocationCoordinate2D (37.797865, -122.402526)
            };
            mapView.AddMarker (xamarinhq);
        }
        public override void LoadView()
        {
            base.LoadView ();

            GMSCameraPosition camera = GMSCameraPosition.FromCamera (37.797865, -122.402526, 6);
            mapView = GMSMapView.FromCamera(RectangleF.Empty, camera);
            mapView.MyLocationEnabled = true;
            this.View = mapView;

            var xamarinhq = new GMSMarkerOptions {
                Title = "Xamarin HQ",
                Snippet = "Where the magic happens.",
                Position = new CLLocationCoordinate2D (37.797865, -122.402526)
            };
            mapView.AddMarker (xamarinhq);
        }
Ejemplo n.º 3
0
 public GMSMarker AddMarker(GMSMarkerOptions options)
 {
     return new GMSMarker (InternalAddMarker (options));
 }