Closed jochenjonc closed 6 years ago
This is more an issue with the leaflet css styles then with our module, but it is a known issue.
We had already implemented something that helps you out with that: All leaflet div icon wrapper that are YAGA instances have the class attribute yaga-div-icon
. With that CSS class you are able to change this behavior like you wish.
A quick example:
.yaga-div-icon {
background-color: transparent;
border: 0;
}
@jochenjonc does this fix your problem? Can you give additional feedback or close this issue?
@atd-schubert it fixed the problem, but I had to use the following in my components scss file:
:host ::ng-deep .yaga-div-icon {
background-color: transparent;
border: 0;
}
With leaflet-ng2 I'm unable to set the iconSize of a yaga-div-icon so that the default white square isn't visible. It is possible to set the size to [0, 0], but this still draws a little dot on the map.
There was an issue on the leafletjs GitHub site about this and the solution there was too set the iconSize to null.
I've updated the fiddle the was part of the issue a little but to show how leaflet does it: http://jsfiddle.net/s1duc9mm/2/
When I do the same with leaflet-ng2, it seem that iconSize with value null is ignored and not passed to leafletjs.