First you need to add custom map render to your android project that will inherit MapRenderer, GoogleMap.IInfoWindowAdapter
public class MyMapRenderer : MapRenderer, GoogleMap.IInfoWindowAdapter
I have added 2 private fields
private GoogleMap _map;
private LatLngBounds.Builder _builder;
In the constructor initialize your _builder:
public MyMapRenderer(Context context) : base(context)
{
_builder = new LatLngBounds.Builder();
}
When override OnMapReady method set GoogleMap property as this:
protected override void OnMapReady(GoogleMap map)
{
base.OnMapReady(map);
NativeMap.InfoWindowClick += OnInfoWindowClick;
NativeMap.SetInfoWindowAdapter(this);
if (_map == null)
{
_map = map;
}
}
And you need to override CreateMarker method so you can change your zoom level
protected override MarkerOptions CreateMarker(Pin pin)
{
var p = (THHPin)pin;
var marker = new MarkerOptions();
LatLng position = new LatLng(pin.Position.Latitude, pin.Position.Longitude);
marker.SetPosition(position);
marker.SetTitle(pin.Label);
marker.SetSnippet(pin.Address);
_builder.Include(position);
LatLngBounds bounds = _builder.Build();
CameraUpdate cu = CameraUpdateFactory.NewLatLngBounds(bounds, 20);
_map.MoveCamera(cu);
return marker;
}