title: Setting formula for maxBounds in Leaflet not working
body: <p>I want to use a formula to compute the maxBounds that will be set for the map, but I cannot get it to work. Has it something to do with the numbers not recognized as integers (since I tried using numbers as the latitude and longitude and it would work).</p>
  
  <pre><code>&lt;div id='latitude'&gt;17.5965&lt;/div&gt;
  &lt;div id='longitude'&gt;120.6179&lt;/div&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>var lat = document.getElementById('latitude').innerHTML;
  var lon = document.getElementById('longitude').innerHTML;
  
  var minLat = lat - 0.3; //subtract 0.3
  var minLon = lon - 0.3; //subtract 0.3
  var maxLat = lat + 0.3; //add 0.3
  var maxLon = lon + 0.3; //add 0.3
  
  var bounds = [[minLat,  minLon], [maxLat, maxLon]];
  
  L.rectangle(bounds, {color: "#ff7800", opacity:0, weight: 0}).addTo(map);
  
  map.fitBounds(bounds, {reset: true}).setMaxBounds(bounds);
  map.setView([lat, lon], 13);
  </code></pre>