GoJS does not provide an automatic mechanism for coalescing nodes when zooming out, or the reverse. In my experience I tried a couple algorithms that did this automatically, and I didn’t like the results for any of them.
So I recommend that you implement this yourself. You know your data better than anyone, so you can figure out when to coalesce and which ones to coalesce. There might well be times when you want to remove some nodes but not others, even though they are within the “area” that has been collapsed.
The primary mechanism is to implement a “ViewportBoundsChanged” DiagramEvent listener. Look for a scale change:
Thanks for your help Walter, I’m trying the “ViewportBoundsChanged” but in the leaflet sample it is not being fired when zooming in/out or while dragging, I tried with my google maps page but it doesn’t work either.
Could I stick to the map’s zoomend events for doing so? or is there a way for enabling the “ViewportBoundsChanged” event in the leaflet sample?