title: How do you zoom to bounding box using Xamarin Maps?
body: <p>I have a Xamarin Android map (VS2019) and a number of lat/long points. What I want to do is have the map zoom in (or out), given a set of coordinates that set a bounding box.</p>
  <p>I have this code (below) which doesn't seem to do anything. I've read all the documentation which suggests it should work but doesn't. I have checked and the bounding box coordinates are set correctly but the map doesn't do anything.</p>
  <p>According to the docs calling <code>LayOut</code> should make it update but it doesn't do anything, no errors, just nothing.</p>
  <p>How do I achieve this, any help would be much appreciated.</p>
  <pre><code>    MyMap.Layout(GetBounds(points));
  
      private Rectangle GetBounds(List&lt;Point&gt; points)
      {
          var minx = (from x in points select x.X).Min();
          var maxx = (from x in points select x.X).Max();
          var miny = (from x in points select x.Y).Min();
          var maxy = (from x in points select x.Y).Max();
  
          Rectangle rectangle = new Rectangle(minx, miny, maxx - minx, maxy - miny);
  
          return rectangle;
  
      }
  </code></pre>