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

Strange featureGroup behavior with svg icons (they are not displayed) #508

Open
1 of 6 tasks
victory-v opened this issue Dec 30, 2019 · 8 comments
Open
1 of 6 tasks
Labels
bug confirmed Issue is accepted as either a bug or a valid enhancement help wanted

Comments

@victory-v
Copy link

victory-v commented Dec 30, 2019

Description

I added icons for markers as svg-code. Inside featureGroup icons aren't displayed on the map (while markers themselves are presented and svg-code is in the marker too). In the same time, in devtools I found strange div block inside the map with display:none styles with all my icons inside again. If I remove display:none, I can see all my icons.

Live Demo

https://codesandbox.io/s/suspicious-spence-tu812 (components -> HelloWorld.vue)

Steps to Reproduce

See the demo (map in the sandbox isn't working well but the icons behavior is the same as on my localhost)

Expected Results

I see marker's svg-icons inside featuregroup

Actual Results

Icons are not visible

Browsers Affected

  • Chrome
  • Firefox
  • Edge
  • Safari 9
  • Safari 8
  • IE 11

Versions

latest

@DonNicoJs
Copy link
Member

@victory-v Thanks for the issue AND the codesandbox!

Will investigate!

@DonNicoJs DonNicoJs added the confirmed Issue is accepted as either a bug or a valid enhancement label Jan 1, 2020
@DonNicoJs
Copy link
Member

@victory-v I've checked your codesandbox, if I remove some of the extra markup of the svg they show up:
https://codesandbox.io/s/hardcore-lewin-bqyqr

The display:none is a trick that we use to feed leaflet the correct markup so you should not worry about it.

@victory-v
Copy link
Author

@DonNicoJs alright, I see that it doesn't work with all that filters but with normal fill or stroke attributes it works well.

@DonNicoJs
Copy link
Member

@victory-v I suspect that this is more a leaflet issue than vue2leaflet, maybe you can try to investigate there.

But please let me know if you think is something related on how we handle the icon here in vue2leaflet!

@victory-v
Copy link
Author

@DonNicoJs in plain Leaflet everything was ok, then I switched to vue2leflet and faced this problem.
Actually without featureGroup everything is fine on my localhost but somehow I can't reproduce this in sandbox.

@DonNicoJs
Copy link
Member

@victory-v Interesting, try to check if the version on codesabbox, locally are the same I recently released a fix for featureGroup ;)

@victory-v
Copy link
Author

@DonNicoJs locally I had the same version 2.4.1, I updated to 2.4.2 but visually nothing changed

@DonNicoJs
Copy link
Member

@victory-v mmh this is weird, if you find a way to reproduce this let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed Issue is accepted as either a bug or a valid enhancement help wanted
Projects
None yet
Development

No branches or pull requests

2 participants