This is my code, I think it may has some mistakes:
var bounds_array;
google.maps.event.addListener(map,\'bounds_changed\', function (){
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());
}