-
Notifications
You must be signed in to change notification settings - Fork 69
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
Not working correctly with circleMarker #13
Comments
Running into this same issue as well. I have multiple maps, one using regular |
cc @96187: This looks like it's related to the l296: l326: |
Its a long time since there was activity on this project and while I'm converting my other work to Leaflet 1.0 I thought I'd have a look at this issue. I know nothing about coffescript, so cut/paste it into a website to convert to js and am using that directly now, so all of the below is in the raw js. As @therealtakeshi above pointed out, when using a circlemarker the zIndexOffset function doesn't apply. I also replaced the accessing of the private variable (_path) by using a 'marker instanceof L.CircleMarker' comparison. That fixed the script error, but now the circle markers simply didn't spiderfy - nothing happened at all. I got firebug into action and stepped through the code and could see that the markers were actually spiderfying and then immediately unspiderfying. It looks as is the click event on the marker was correctly spiderfying, but then the click event was propagating through to the map itself, which caused the normal unspiderfy action called as if the map was clicked in "open space". To fix it I did a quick hack - there is probably a more elegant solution to this which stops the propagation of the leaflet event, but with my deadlines I'm all about the quick hack. What I did:
replace with:
I hope that helps someone else. Sorry for not doing the "proper" update through github, but I don't do coffeescript, and it looks as if this plugin has been abandoned anyway. |
I tried to use this with circleMarker but it doesn't seem to work as expected. Instead of expanding the entire group, it only expands one marker per click.
I managed to reproduce the behaviour with the demo by changing
var marker = new L.Marker(loc, {icon: new darkIcon()});
to
var marker = new L.circleMarker(loc, { color: 'red', radius: 5 });
The text was updated successfully, but these errors were encountered: