Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for changing geojson layer opacity #265

Merged
merged 1 commit into from Jul 8, 2022
Merged

Added support for changing geojson layer opacity #265

merged 1 commit into from Jul 8, 2022

Conversation

giswqs
Copy link
Member

@giswqs giswqs commented Jul 8, 2022

Thanks to ipyleaflet v0.17.0, leafmap now supports changing GeoJSON layer visibility and opacity interactively.

@davidbrochart @martinRenou @jasongrout

import leafmap
m = leafmap.Map()
m.add_basemap("CartoDB.DarkMatter")
in_geojson = 'https://raw.githubusercontent.com/giswqs/geemap/master/examples/data/cable-geo.geojson'
callback = lambda feat: {"color": "#" + feat["properties"]["color"], "weight": 2}
m.add_geojson(in_geojson, layer_name="Cable lines", style_callback=callback, info_mode=None)
m

Peek 2022-07-08 14-57

@giswqs giswqs added the Feature Request New feature or request label Jul 8, 2022
@giswqs giswqs added this to In progress in leafmap via automation Jul 8, 2022
@giswqs giswqs self-assigned this Jul 8, 2022
@giswqs giswqs merged commit ce4af8c into master Jul 8, 2022
@giswqs giswqs deleted the geojson branch July 8, 2022 19:09
leafmap automation moved this from In progress to Done Jul 8, 2022
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this pull request Feb 18, 2023
Added support for changing geojson layer opacity

Former-commit-id: ce4af8c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant