Adding Split Map¶
In [1]:
Copied!
import beamgis.foliumap as beam
import beamgis.foliumap as beam
In [2]:
Copied!
# Create a map centered at a specific location
m = beam.Map(center=[35.9606, -83.9208], zoom=12)
# Create a map centered at a specific location
m = beam.Map(center=[35.9606, -83.9208], zoom=12)
In [3]:
Copied!
m.add_split_map(left="CartoDB.DarkMatter", right="cartodbpositron")
m.add_layer_control()
m
m.add_split_map(left="CartoDB.DarkMatter", right="cartodbpositron")
m.add_layer_control()
m
Out[3]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [4]:
Copied!
# Create a new map centered at a specific location with a split map view
# The left map displays a DEM raster with a "viridis" colormap and 0.9 opacity
# The right map displays a Landsat raster with a "magma" colormap and 0.5 opacity
raster_m = beam.Map(center=[-8.3793, -74.5357], zoom=10)
raster_m.add_split_map(
left=r"https://github.com/opengeos/datasets/releases/download/raster/dem_90m.tif",
right=r"https://github.com/opengeos/datasets/releases/download/raster/LC09_039035_20240708_90m.tif",
colormap_left="terrain",
colormap_right="viridis",
)
raster_m
# Create a new map centered at a specific location with a split map view
# The left map displays a DEM raster with a "viridis" colormap and 0.9 opacity
# The right map displays a Landsat raster with a "magma" colormap and 0.5 opacity
raster_m = beam.Map(center=[-8.3793, -74.5357], zoom=10)
raster_m.add_split_map(
left=r"https://github.com/opengeos/datasets/releases/download/raster/dem_90m.tif",
right=r"https://github.com/opengeos/datasets/releases/download/raster/LC09_039035_20240708_90m.tif",
colormap_left="terrain",
colormap_right="viridis",
)
raster_m
Out[4]:
Make this Notebook Trusted to load map: File -> Trust Notebook