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

Labeling FeatureCollection #815

Closed
giswqs opened this issue Dec 13, 2021 Discussed in #814 · 3 comments
Closed

Labeling FeatureCollection #815

giswqs opened this issue Dec 13, 2021 Discussed in #814 · 3 comments
Labels
Feature Request New feature or request

Comments

@giswqs
Copy link
Member

giswqs commented Dec 13, 2021

Discussed in #814

Originally posted by bismarksr17 December 13, 2021
Hello, I would like to know how I can label the FeatureCollection in GeeMap, something similar to the image in the link!

IMG

References:

import folium
from folium.features import DivIcon
m = folium.Map([34.0302, -118.2352], zoom_start=13)
folium.map.Marker(
    [34.0302, -118.2352],
    icon=DivIcon(
        icon_size=(150,36),
        icon_anchor=(0,0),
        html='<div style="font-size: 24pt">Test</div>',
        )
    ).add_to(m)
m

image

@giswqs
Copy link
Member Author

giswqs commented Dec 16, 2021

This feature has been implemented. See notebook example https://geemap.org/notebooks/89_add_labels

@giswqs giswqs closed this as completed Dec 16, 2021
@dfguerrerom
Copy link

What Ipyleaflet version are you using?
Having this error when using version '0.13.3'

AttributeError: module 'ipyleaflet' has no attribute 'DivIcon'

@giswqs
Copy link
Member Author

giswqs commented Dec 17, 2021

pip install ipyleaflet==0.14.0

giswqs added a commit that referenced this issue Dec 23, 2021
giswqs added a commit that referenced this issue Dec 23, 2021
giswqs added a commit that referenced this issue Dec 24, 2021
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
None yet
Development

No branches or pull requests

2 participants