Skip to content

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
Discussion options

You must be logged in to vote

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="…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by giswqs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants