gee-community / geemap

A Python package for interactive geospatial analysis and visualization with Google Earth Engine.
https://geemap.org
MIT License
3.47k stars 1.09k forks source link

style_callback param for add_geojson() not working? #692

Closed deeplook closed 3 years ago

deeplook commented 3 years ago

Environment Information

Description

Essentially the same as https://github.com/giswqs/leafmap/issues/119.

Screen Shot 2021-10-03 at 23 28 34
giswqs commented 3 years ago

This bug has been fixed. Thanks for reporting.

import geemap
m = geemap.Map(center=[0, 0], zoom=2, height="400px")
in_geojson = 'https://raw.githubusercontent.com/telegeography/www.submarinecablemap.com/master/web/public/api/v3/cable/cable-geo.json'
callback = lambda feat: {"color": feat["properties"]["color"]}
m.add_geojson(in_geojson, layer_name="Cable lines", style_callback=callback)
m

image

deeplook commented 3 years ago

Any idea when a release > 0.9.2 will be available? (No rush...!)

giswqs commented 3 years ago

Probably tonight or tomorrow morning. I am working on some new features to add to this new release.