<!DOCTYPE html>
<html>
<head>
<title>Tạo Ractangle</title>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
</head>
<body>
   <div>
        <div id="divMap" style="width:800px; height:400px"></div>

 </div>
<script src="http://developers.vietbando.com/V2/Scripts/vietbandomapsapi.js?key=d5047e60-f15f-419f-9e42-1700a7a97e60" type="text/javascript"></script>
<script>

function initialize(){

/*key=ABCDEFG Bạn phải thay ABCDEFG bằng key mà bạn đăng ký */
/*Tạo property cho map*/

  var mapProp = {
      center: new vietbando.LatLng(10.8152328, 106.680505),
      zoom: 10
  };

/*Tạo map object với property(mapProp)*/
  var map = new vietbando.Map(document.getElementById("divMap"), mapProp);


 var boundmap = map.getBounds();
 var myrect = new vietbando.Rectangle({ bounds: boundmap });
 myrect.setMap(map);
 map.setZoom(map.getZoom() - 2);
}

/*Khởi động map sau khi page load xong*/

vietbando.event.addDomListener(window, 'load', initialize);

</script>
</body>
</html>