Skip to content

Commit

Permalink
Add tile layer params for split map (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Apr 2, 2024
1 parent 57b9b24 commit 496d878
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions leafmap/foliumap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2614,6 +2614,7 @@ def split_map(
name=left_name,
attr=" ",
overlay=True,
**left_args,
)

elif left_layer.startswith("http") and left_layer.endswith(".json"):
Expand All @@ -2625,6 +2626,7 @@ def split_map(
name=left_name,
attr=" ",
overlay=True,
**left_args,
)

elif os.path.exists(left_layer):
Expand Down Expand Up @@ -2673,6 +2675,7 @@ def split_map(
name=right_name,
attr=" ",
overlay=True,
**right_args,
)

elif right_layer.startswith("http") and right_layer.endswith(".json"):
Expand All @@ -2684,6 +2687,7 @@ def split_map(
name=right_name,
attr=" ",
overlay=True,
**right_args,
)

elif os.path.exists(right_layer):
Expand Down
4 changes: 4 additions & 0 deletions leafmap/leafmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,7 @@ def split_map(
url=url,
name=left_name,
attribution=" ",
**left_args,
)
elif left_layer.startswith("http") and left_layer.endswith(".json"):
left_tile_url = stac_tile(left_layer, **left_args)
Expand All @@ -1480,6 +1481,7 @@ def split_map(
url=left_tile_url,
name=left_name,
attribution=" ",
**left_args,
)
elif left_layer.startswith("http") and left_layer.endswith(".geojson"):
if "max_zoom" in left_args:
Expand Down Expand Up @@ -1539,6 +1541,7 @@ def split_map(
url=url,
name=right_name,
attribution=" ",
**right_args,
)

elif right_layer.startswith("http") and right_layer.endswith(".json"):
Expand All @@ -1549,6 +1552,7 @@ def split_map(
url=right_tile_url,
name=right_name,
attribution=" ",
**right_args,
)
elif right_layer.startswith("http") and right_layer.endswith(
".geojson"
Expand Down

0 comments on commit 496d878

Please sign in to comment.