<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<h2>Create your snippet's HTML, CSS and Javascript in the editor tabs</h2>
</div>
</div>
$(function () {
var lat = 53.3328204224035;
var lon = 44.798077244933;
var km = 8;
var lenght = (1/111.3)*km;
var vcnt = 4;
var hcnt =5;
var rect = [];
var lat2 = lat - lenght;
var lon2 = lon +(km*(1/(111.3*Math.cos(lat2))));
var rects = [];
for (h=0; h<hcnt;h++) {
for (i = 0; i < vcnt; i++) {
rect[0]=lat-lenght*i;
rect[1]=lat2-lenght*i;
rect[2]=lon+h*(km*(1/(111.3*Math.cos(lat2))));
rect[3]=lon2;
rects.push(rect);
}
}
//console.log(lon);
console.log(JSON.stringify(rects));
//console.log(rects);
});