DivIcon transparent background
See original GitHub issueThe DivIcon has a white background. Is it possible to make it transparent? Thanks.
Relevant issue: https://github.com/jupyter-widgets/ipyleaflet/issues/792 @deeplook
from ipyleaflet import Marker, DivIcon, Map
center = (52.204793, 360.121558)
m = Map(center=center, zoom=10)
icon = DivIcon(html='foo bar', bg_pos=[0, 0], icon_size=[150, 150])
mark = Marker(location=center, icon=icon)
m.add_layer(mark);
m
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
leaflet - divicon - How to hide the default square shadow?
By default, it has a 'leaflet-div-icon' CSS class and is styled as a little white square with a shadow. But how can I...
Read more >Creating Custom Styles Leaflet Icons With DivIcon and CSS
.leaflet-div-icon { background: #fff; border: 1px solid #666; } ... .leaflet-div-event { background: transparent; border: 0px transparent; margin-left: ...
Read more >Developers - DivIcon transparent background - - Bountysource
The DivIcon has a white background. Is it possible to make it transparent? Thanks. Relevant issue: https://github.com/jupyter-widgets/ipyleaflet/issues/792 ...
Read more >Can I set Leaflet background as transparent? - Stack Overflow
Theoretically,you use a massive DivIcon as the icon for a L.Marker , place the sun clock widget in that DivIcon , disable clicks...
Read more >Set DivIcon size in CSS? - Google Groups
background -image: url(foo.png);. height: 34px;. width: 34px;. } But the DivIcon still renders as: <div class="leaflet-marker-icon my-div-icon-class ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You could maybe import
from IPython.display import HTML
and display it usingfrom IPython.display import display
. But that’s a hacky solution. It would be nicer using a real ipyleaflet solution.If you don’t mind, we could keep this issue open until this is properly implemented in ipyleaflet 😊