Make map:get_camera_position() also return the size of the visible area.