Can anyone help me with the logic on how should I get the maximum/minimum coordinates, with an array of coodinates? What I'm trying to get is the longest distance it can get out of those array of coordinates. Ex.
    var coordinates = [{
       lat: -231,
       lng: 223l
    }, {
       lat: 43,
       lng: -4323
    }, {
       lat: 42312,
       lng: -231
    }, {
       lat: 435345,
       lng: -6563
    }]
    // some filter calculation here...
    // This is what I need
    var min_coords = { lat, lng }
    var max_coords = { lat, lng }