1. Home >
  2. Documentation >
  3. Overlays >
  4. rectangle
 

rectangle

This function adds a google.maps.Rectangle.

Usage

Parameters

Note

Example

$("#test").gmap3({
  rectangle:{
    options:{
      bounds: {n:40.780, e:-73.932, s:40.742, w:-73.967},
      fillColor : "#F4AFFF",
      strokeColor : "#CB53DF",
      clickable: true
    },
    events:{
      click: function(rectangle){
        rectangle.setOptions({
          fillColor : "#FFAF9F",
          strokeColor : "#FF512F"	
        });
      }
    },
    callback: function(){
      $(this).gmap3('get').setZoom(12);
    }
  }
});
Close