Skip to content

Commit 72586fe

Browse files
author
Martin Journois
committed
clipping lat_min and lat_max
1 parent 8c27942 commit 72586fe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

folium/plugins/image_overlay.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def mercator_transform(data, lat_bounds, origin='upper', height_out=None):
4141
array = np.atleast_3d(data).copy()
4242
height, width, nblayers = array.shape
4343

44-
lat_min, lat_max = lat_bounds
44+
lat_min = max(lat_bounds[0], -85.051128779806589)
45+
lat_max = min(lat_bounds[1], 85.051128779806589)
4546
if height_out is None:
4647
height_out = height
4748

0 commit comments

Comments
 (0)