Closed JRHutson closed 9 years ago
Try this method from Leaflet. http://leafletjs.com/reference.html#latlng
Issue was comma between coordinates. Seems fixed now. Will sync to gh-pages to test on mobile.
Working on both Desktop and Mobile. Will sync to Master.
The code below seems to set the extent based on making all features in a layer visible. This could allow the initial extent to adjust dynamically on desktop vs. mobile.
var group = new L.featureGroup([marker1, marker2, marker3]);
map.fitBounds(group.getBounds());
Source: http://gis.stackexchange.com/questions/76113/dynamically-set-zoom-level-based-on-a-bounding-box