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

Highlight feature and bring to front #185

Open
RGregat opened this issue Oct 19, 2018 · 4 comments · May be fixed by #270
Open

Highlight feature and bring to front #185

RGregat opened this issue Oct 19, 2018 · 4 comments · May be fixed by #270

Comments

@RGregat
Copy link

RGregat commented Oct 19, 2018

Hi,
I have one question regarding the highlighting of a feature. Currently I have the problem, that parts of a geometry are overlapped by other geometries. That means, that parts of the highlighted feature are not visible.

map-export

Is it possible to put the highlighted feature to the front, or just create a copy of the feature?

@mngyng
Copy link

mngyng commented Dec 14, 2018

Do you have a composite layer, like, having a country border outside of the states border and published them as one vector tile layer? If so, I'm guessing this is a similar issue with #167. Tell me if that sounds promising. I have a yet-to-polish workaround codes for that matter.

@revatim
Copy link

revatim commented Jul 26, 2019

Is this fixed? I am facing the same issue.

@mngyng
Copy link

mngyng commented Jul 29, 2019

Is this fixed? I am facing the same issue.
Well I posted a workaround in #167, not sure if that solves your problem.
If you're asking for a fix in a latest version of VectorGrid, I don't think they fixed the problem so far.

@tottile
Copy link

tottile commented Nov 30, 2021

I have a suggestion for a simple bugfix:

editing to the function setFeatureStyle in https://github.com/Leaflet/Leaflet.VectorGrid/blob/master/src/Leaflet.VectorGrid.js by adding the line

feature.feature.bringToFront();

right after

this._updateStyles(feature.feature, tile, styleOptions);

should fix the problem.

UPDATE:
I created a pull request Fix issue 185

@tottile tottile linked a pull request Nov 30, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants