protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Map); _map = FindViewById<MapView>(Resource.Id.Map); _map.SetBuiltInZoomControls(true); var newYorkCity = new GeoPoint((int) (40.716667 * 1e6), (int) (-74 * 1e6)); _map.Controller.SetCenter(newYorkCity); _map.Controller.SetZoom(14); _mapOverlay = new MapOverlay(Resources.GetDrawable(Resource.Drawable.Icon), this); _map.Overlays.Add(_mapOverlay); _mapOverlay.Add(newYorkCity, "New York City"); _locationManager = (LocationManager)GetSystemService(LocationService); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Map); _map = FindViewById <MapView>(Resource.Id.Map); _map.SetBuiltInZoomControls(true); var newYorkCity = new GeoPoint((int)(40.716667 * 1e6), (int)(-74 * 1e6)); _map.Controller.SetCenter(newYorkCity); _map.Controller.SetZoom(14); _mapOverlay = new MapOverlay(Resources.GetDrawable(Resource.Drawable.Icon), this); _map.Overlays.Add(_mapOverlay); _mapOverlay.Add(newYorkCity, "New York City"); _locationManager = (LocationManager)GetSystemService(LocationService); }