add point gdf to the split_map in addition to existing left & right layers #934
Answered
by
giswqs
emilianosantin
asked this question in
Q&A
-
Hi I am trying to add a point gdf to the split map. Is it possible to add points that are present of both sides of the split, in addition to the left and right layers. Thanks this has been extremely helpful. I am trying to use visualize houses affected by the disaster.
|
Beta Was this translation helpful? Give feedback.
Answered by
giswqs
Oct 24, 2024
Replies: 1 comment
-
Sure. Here is an example. import leafmap
import geopandas as gpd
m = leafmap.Map(center=[47.653149, -117.59825], zoom=16)
m.add_basemap("Satellite")
image1 = "https://github.com/opengeos/datasets/releases/download/places/wa_building_image.tif"
image2 = "https://github.com/opengeos/datasets/releases/download/places/wa_building_masks.tif"
m.split_map(
image2,
image1,
left_label="Building Masks",
right_label="Aerial Imagery",
left_args={"colormap_name": "tab20", "nodata": 0, "opacity": 0.7},
)
url = "https://github.com/opengeos/datasets/releases/download/places/wa_building_centroids.geojson"
gdf = gpd.read_file(url)
m.add_circle_markers_from_xy(
gdf, radius=3, color="red", fill_color="yellow", fill_opacity=0.8
)
m |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
giswqs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure. Here is an example.