lets-plot
lets-plot copied to clipboard
livemap: tile tooltip is not working with polygons layer present.
See nb: https://github.com/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks-dev/issues/map_tile_tooltip.ipynb
The tooltip is working on all plots except the last one.
Need to check with recent LP version.
Still happens:
from lets_plot import *
from lets_plot.geo_data import *
LetsPlot.setup_html()
ggplot() + \
geom_livemap() + \
geom_tile(x=-71.08845, y=42.71104, tooltips=layer_tooltips().line("Some info")) + \
geom_map(map=geocode_states("Massachusetts").get_limits())
Plot spec:
{
"mapping": {},
"data_meta": {},
"kind": "plot",
"scales": [],
"layers": [
{
"geom": "livemap",
"mapping": {},
"data_meta": {},
"tiles": {
"kind": "vector_lets_plot",
"url": "ws://10.0.0.127:3943",
"theme": "color",
"attribution": "Map: <a href=\"[https://github.com/JetBrains/lets-plot\](https://github.com/JetBrains/lets-plot/)">\u00a9 Lets-Plot</a>, map data: <a href=\"[https://www.openstreetmap.org/copyright\](https://www.openstreetmap.org/copyright/)">\u00a9 OpenStreetMap contributors</a>."
},
"geocoding": {
"url": "http://10.0.0.127:3020/map_data/geocoding"
}
},
{
"geom": "tile",
"mapping": {},
"tooltips": {
"formats": [],
"lines": [
"Some info"
]
},
"data_meta": {},
"x": -71.08845,
"y": 42.71104
},
{
"geom": "map",
"mapping": {},
"data_meta": {},
"map": {
"state": [
"Massachusetts"
],
"found name": [
"Massachusetts"
],
"geometry": [
"{\"type\": \"Polygon\", \"coordinates\": [[[-69.9292968213558, 41.2393619120121], [-69.9292968213558, 42.8867787122726], [-73.5082098841667, 42.8867787122726], [-73.5082098841667, 41.2393619120121], [-69.9292968213558, 41.2393619120121]]]}"
]
},
"map_data_meta": {
"geodataframe": {
"geometry": "geometry"
}
}
}
],
"metainfo_list": []
}