Skip to content

fill colors gdf #527

Answered by giswqs
rh-afk asked this question in Q&A
Aug 31, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Run leafmap.update_package() and restart the kernel. Alternatively, you can control the style.

countries = "https://open.gishub.org/data/world/countries.geojson"
m = leafmap.Map(center=[0, 0], zoom=2)
style = {
    "stroke": True,
    "color": "#0000ff",
    "weight": 2,
    "opacity": 1,
    "fill": True,
    "fillColor": "#0000ff",
    "fillOpacity": 0.1,
}
hover_style = {"fillOpacity": 0.7}
m.add_geojson(countries, layer_name="Countries", style=style, hover_style=hover_style)
m

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@rh-afk
Comment options

@giswqs
Comment options

@rh-afk
Comment options

@rh-afk
Comment options

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