ellipsis-drive / folium

MIT License
1 stars 0 forks source link

Add popup and tooltip to output of addEllipsisVectorLayer() #2

Open BasAndriessen opened 1 year ago

BasAndriessen commented 1 year ago

Hi Daniel,

It would be really useful if a popup and tooltip could be added to the output of the addEllipsisVectorLayer() function. Then, I don't have to use a separate slow function of Folium to add a popup and tooltip with a geojson file.

Previously, I have used the folium.GeoJson() function with tooltip=folium.features.GeoJsonTooltip(fields=fields,aliases=user_names) to do so.

Kind regards,

Bas

danielvandermaas commented 11 months ago

do you have some code snippet on how to add tooltips to a VectorGridProtobuf in folium?

BasAndriessen commented 11 months ago

Unfortunately, I have not seen it as an argument to VectorGridProtobuf. I used the following: tooltip

to add a tooltip. Since it can not be passed as an argument to VectorGridProtobuf, it is not possible without using a separate function?

BasAndriessen commented 11 months ago

After the update of Leafmap, speed is not a big issue anymore, so I can still use the above additional function to add a tooltip within a short time. Hence, adding the tooltip functionality to your function is not really required anymore for me.

However, in case you would add it I would like to know, since that would still be faster.

danielvandermaas commented 11 months ago

The function just wraps the vectorProtobufGrid so if that function does not support it I don't think it's going to he easy to add.

What is easy to add is a label on the geometries as that can be implemented via the style of the layer