jmp75 / ipyleaflet-dashboard-tools

Experimental reusable componentry for ipywidgets
Other
0 stars 0 forks source link

Default popup HTML for markers seem to prevent the display of the MarkerCluster layer #4

Open jmp75 opened 6 days ago

jmp75 commented 6 days ago

I am trying to display the location of HRS I got from Julien, using the ipyleaflet map being shown via a shiny for python server. It took me hours to figure out that what seem to prevent the display (no error shown,no exception thrown that I can see). the popup messages seem to be what is interfering.

Environment Information

What I did

def _innerbuild_map():
    inner_mapv = Map(center=(-35, 140.34580993652344), zoom=3, basemap=basemaps.OpenTopoMap)
    markers = []
    i = 0
    for k in v.marker_info:
        marker = Marker(location=k, draggable=False)
        message = v.create_popup(k)
        # marker.popup = message # IF uncommented, markers fail to display. 
        markers.append(marker)
        i = i + 1
        #if i > 4:
        #    break
    cluster = MarkerCluster(markers=markers)
    inner_mapv.add_layer(cluster)
    return inner_mapv
jmp75 commented 4 days ago

Known issue in shinywidgets: py-shinywidgets/issues/101