netjsongraph.js icon indicating copy to clipboard operation
netjsongraph.js copied to clipboard

[change] Allow showing node names on geo map on high zoom levels

Open nemesifier opened this issue 2 years ago • 3 comments

We can allow showing node names on geo map on high zoom levels, we could turn this on by default.

nemesifier avatar Oct 05 '23 14:10 nemesifier

Hi @nemesifier, I would like to work on this issue.

Please correct me if I’m wrong. Do we need to include the name and set it as the default instead of the label?

Image

Tusharjamdade avatar Feb 06 '25 06:02 Tusharjamdade

hello @nemesifier This feature would improve usability by showing names dynamically when users zoom in, reducing clutter at lower zoom levels. here firstly we can define a zoom thresold and then modify the map rendering logic and we can also implement dynamic tooltips in case of leaflet . working on this currently . Would need help in integration my code into this . Hoping for ur response

Anshika-121 avatar Feb 25 '25 07:02 Anshika-121

We can allow showing node names on geo map on high zoom levels, we could turn this on by default.

Image

Hey @nemesifier ,

I took a look at the codebase regarding your request to show node names on geo maps at high zoom levels by default. From what I found, this feature is already in place—labels automatically appear when users zoom to level 7 or above, thanks to the showLabelsAtZoomLevel setting.

Could you clarify what exactly you'd like to change?

LIke: -Do you want labels to appear at a different zoom level? -Are you running into an issue where labels aren’t showing as expected? -Are you looking for changes in the way labels are styled or positioned?

From what I can see, the current setup already aligns with your request, but let me know if I’m missing something!

Looking forward to your thoughts.

Thanks! @cestercian

cestercian avatar Mar 29 '25 23:03 cestercian

So the problem now is that the node labels are always shown by default, which is undesirable.

Image

We should show the node labels only on high zoom levels. Can we add a background to make the text more readable? Can we make the foreground and background colors of these labels configurable? The background should allow semi-transparency.

nemesifier avatar Jul 08 '25 18:07 nemesifier

Image

we can change this configuration to hide it by default

src/js/netjsongraph.config.js from line : 172 under mapOptions

cestercian avatar Jul 09 '25 18:07 cestercian