I have a leaflet.js map that has points and linestrings on it that come from an external JSON file.

If I add:

map.setView(new L.LatLng(0,0), 10);

It will centre the map on the latitude and longitude 0,0. How can I set it so the map centre and zoom fit all of the points from the JSON on it?

Edit
Report