📅  最后修改于: 2022-03-11 15:00:51.628000             🧑  作者: Mango
function arePointsNear(point1, point2) {
var sw = new google.maps.LatLng(point2.lat() - 0.005, point2.lng() - 0.005);
var ne = new google.maps.LatLng(point2.lat() + 0.005, point2.lng() + 0.005);
var bounds = new google.maps.LatLngBounds(sw, ne);
if (bounds.contains (point1))
return true;
return false;
}