Skip to content

Commit

Permalink
Fixed linked maps bug
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Aug 5, 2021
1 parent 0eb9686 commit 5eb5032
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions leafmap/leafmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2386,7 +2386,7 @@ def linked_maps(
if len(layers) == 1:
layers = layers * count
elif len(layers) < count:
raise ValueError(f"The length of ee_objects must be equal to {count}.")
raise ValueError(f"The length of layers must be equal to {count}.")

if len(labels) > 0:
if len(labels) == 1:
Expand All @@ -2396,7 +2396,7 @@ def linked_maps(

for i in range(rows):
for j in range(cols):
index = i * rows + j
index = i * cols + j

if "draw_control" not in kwargs:
kwargs["draw_control"] = False
Expand All @@ -2414,7 +2414,8 @@ def linked_maps(
)

if layers[index] in leafmap_basemaps:
m.add_layer(leafmap_basemaps[layers[index]])
# m.add_layer(leafmap_basemaps[layers[index]])
m.add_basemap(layers[index])
else:
try:
m.add_layer(layers[index])
Expand Down

0 comments on commit 5eb5032

Please sign in to comment.