public void OnMapReady (GoogleMap googleMap) { googleMap.MoveCamera (CameraUpdateFactory.NewLatLngZoom (NEWARK, 11)); images.Clear (); images.Add (BitmapDescriptorFactory.FromResource (Resource.Drawable.newark_nj_1922)); images.Add (BitmapDescriptorFactory.FromResource (Resource.Drawable.newark_prudential_sunny)); currentEntry = 0; groundOverlay = googleMap.AddGroundOverlay (new GroundOverlayOptions () .InvokeImage (images [currentEntry]) .Anchor (0, 1) .Position (NEWARK, 8600f, 6500f)); transparencyBar.ProgressChanged += (sender, e) => { if (groundOverlay != null) groundOverlay.Transparency = (float)e.Progress / (float)TRANSPARENCY_MAX; }; googleMap.SetContentDescription ("Google Map with ground overlay."); }
private void PositionPolarBearGroundOverlay(LatLng position) { if (_polarBearOverlay == null) { BitmapDescriptor image = BitmapDescriptorFactory.FromResource(Resource.Drawable.polarbear); GroundOverlayOptions groundOverlayOptions = new GroundOverlayOptions() .Position(position, 150, 200) .InvokeImage(image); _polarBearOverlay = _map.AddGroundOverlay(groundOverlayOptions); PolygonOptions rectOptions = new PolygonOptions(); rectOptions.Add(position); rectOptions.Add(new LatLng(37.45, -122.0)); rectOptions.Add(new LatLng(37.45, -122.2)); rectOptions.Add(new LatLng(37.35, -122.2)); // notice we don't need to close off the polygon _map.AddPolygon(rectOptions); } else { _polarBearOverlay.Position = InMaui; } }
private void PositionPolarBearGroundOverlay(LatLng position) { if (_polarBearOverlay == null) { var image = BitmapDescriptorFactory.FromResource(Resource.Drawable.polarbear); var groundOverlayOptions = new GroundOverlayOptions() .Position(position, 150, 200) .InvokeImage(image); _polarBearOverlay = _map.AddGroundOverlay(groundOverlayOptions); } else { _polarBearOverlay.Position = InMaui; } }
private void PositionChicagoGroundOverlay(LatLng position) { if (_chicagoOverlay == null) { BitmapDescriptor image = BitmapDescriptorFactory.FromResource(Resource.Drawable.monkey); GroundOverlayOptions groundOverlayOptions = new GroundOverlayOptions() .Position(position, 150000, 200000) .InvokeImage(image); _chicagoOverlay = _map.AddGroundOverlay(groundOverlayOptions); } else { _chicagoOverlay.Position = Location_Chicago; } }