SyntaxFix
Write A Post
Hire A Developer
Questions
You could also use:
var latLon = L.latLng(40.737, -73.923); var bounds = latLon.toBounds(500); // 500 = metres map.panTo(latLon).fitBounds(bounds);
This will set the view level to fit the bounds in the map leaflet.