1. Home >
  2. Documentation >
  3. data types >
  4. latLngBounds
 

latLngBounds

The google.maps.LatLngBounds can be simplified by :

  • {ne:LatLng, sw:LatLng} : object of 2 LatLng
  • [ne, sw] : array of 2 LatLng
  • {n:float, e:float, s:float, w:float} : object of 4 floats
  • [n, e, s, w] : array of 4 floats
$("#test").gmap3({ 
  rectangle:{
    values:[
      { options:{
          bounds: {n:40.780, e:-73.932, s:40.742, w:-73.967},
          fillColor : "#FFAF9F",
          strokeColor : "#FF512F",
          clickable:true
        }
      },
      { options:{
          bounds: [40.775, -73.937, 40.747, -73.962],
          fillColor : "#F4AFFF",
          strokeColor : "#CB53DF",
          clickable:true
        }
      }
    ]
  },
  map:{
    options:{
      zoom:12
    }
  }
});
Close