Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 570 Bytes

File metadata and controls

15 lines (13 loc) · 570 Bytes

If you want to know the coordinates are in the bounds, LatLngBounds.contains() method returns the value as boolean.

Method Return value Description
contains(LatLng) Boolean Returns true if the given lat/lng is in this bounds.

Example

map.getVisibleRegion(function(latLngBounds) {
  var point = new plugin.google.maps.LatLng(0, 0);
  var isContained = latLngBounds.contains(point);
  alert(point.toUrlValue() + " is" + (isContained ? " " : " not ") + " contained in this bounds.");
});