If you have more than the whole circumference of the Earth in your viewport, things can go wrong.
The left-hand edge may be further east than the right-hand edge. map.getBounds()
gets the wrong result in this case.
The left-hand edge may be west of the right-hand edge, but area defined by the longitudes of both may not include the point of interest.
Here's an image of a map I developed for another answer which demonstrates that. The left-hand edge is at 83°E and the right-hand edge at 162°E. The markers are at 54°W and 8°W and neither are within map.getBounds()
— they don't lie between 83°E and 162°E — even though they are obviously on the map.
I'm not aware of any method in the API which allows this to be catered for.