Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to know the style is declutter? #15650

Open
longyi-xw opened this issue Mar 19, 2024 · 4 comments
Open

Is there a way to know the style is declutter? #15650

longyi-xw opened this issue Mar 19, 2024 · 4 comments
Labels

Comments

@longyi-xw
Copy link

Describe the bug
I know this isn't a bug, but I might need help.

Expected behavior
When my feature requires a combination of text and line styles at the same time, the text is decluttered using overflow, but the lines still exist. I don't have a way to judge and hide the lines. Do you know of any other ways I can use this combination?

it looks like this now
image

@longyi-xw longyi-xw added the bug label Mar 19, 2024
@ahocevar
Copy link
Member

Unfortunately he only way to determine that is to do hit detection for a known point on the declutter candidate.

@longyi-xw
Copy link
Author

@ahocevar In fact, hitDetectionRenderer can only tell me the target that the mouse is hitting, but it cannot tell me that all points on the map are decluttered. Is there a way for me to re-implement the text declutter myself?

@ahocevar
Copy link
Member

@longyi-xw Yes there is, you could use https://github.com/Geovation/labelgun.

@longyi-xw
Copy link
Author

@ahocevar Thank you for your suggestion, but I use styleFunction. I use three styles combined to form the visible points. If I use this method, I need to additionally render the same part of the data, and the points and labels are stripped. Is there any performance issue? There will be some impact. I now use vectorImage and style caching. There are more than 5,000 data. It seems a bit difficult to double the rendering and control the memory within 400.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants