I have a bunch of leaflet polygons on a map I created. Each polygon represents something different. A specific set of information is displayed in a popup depending on the pa
assuming each polygon has only 4 sides it is simple
var L20 = [
[74.0995, -99.92615],
[74.14008, -99.4043],
[74.07691, -99.33838],
[74.03617, -99.86023]
];
using this example get max and min lat: 74.03617 and 74.14008 respectively so same for long: -99.92615 and 99.33838 respectively
Then get the middle value for each: (max - min) / 2 = 0.051955 and -0.293885 then add them to the minimum amount
gives you a centre of 74.088125, -99.632265