ui-leaflet icon indicating copy to clipboard operation
ui-leaflet copied to clipboard

Labels not coming back after markerclusterer hide() show()

Open nmccready opened this issue 10 years ago • 6 comments

From @cyrilchaponeverysens on September 16, 2015 9:53

When grouping labelled markers in a markerclusterer (this requires both label and markerclusterer plugins), if one hides then show the holding type: 'markerclusterer' overlay layer (be with the layercontrol or programmatically with visible attribute), the label functionnality disapear.

This behavior is not observed when grouping markers with type: 'group'.

See this fiddle. Reproduction :

  • Hover the 2 markers, and notice the labels
  • Go top right to the layercontrol, and uncheck then check both overlays layers
  • Rehover the 2 markers, and notice only the label on the group reappears
  • You can inspect code to notice that on hover the markerclustered marker, the label is not just "hidden", it's not added to the dom anymore

Copied from original issue: tombatossals/angular-leaflet-directive#941

nmccready avatar Nov 02 '15 14:11 nmccready

From @kirimi on September 26, 2015 9:17

+1 I also have same issue.

nmccready avatar Nov 02 '15 14:11 nmccready

From @thatgirlcancode on October 1, 2015 12:23

+1

nmccready avatar Nov 02 '15 14:11 nmccready

I'll try and take a look when I get a chance. Looks to be valid.

nmccready avatar Nov 02 '15 14:11 nmccready

I you would like this resolved sooner.. please anyone dive in.

nmccready avatar Nov 02 '15 14:11 nmccready

I hate to do this, but +1 I haven't had a chance to try it yet, but I wonder if a workaround might be to copy the overlay to a temp object on hide and move it back on show...

BAByrne avatar Feb 11 '16 22:02 BAByrne

+1. some one have problem with the path label too ....?????

omriLugasi avatar Dec 07 '16 10:12 omriLugasi