The LatLngBounds
object comes with a contains()
method which takes a LatLng
point and returns true if the point happens to be within the bounds, or false if outside.
Therefore, what about something like the following?
function check_is_in_or_out(marker){
return map.getBounds().contains(marker.getPosition());
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…