I'm currently using Materialize 0.97.7 along with Leaflet 1.0.1 (the latest version).
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.1/leaflet-src.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.1/leaflet.css">
Issue I'm facing is that when trying to create an overlay with multiple checkboxes to toggle items, the checkboxes do not show up, only labels appear which still function as toggles. However, I prefer having checkboxes or switches. Interestingly, when switching the CSS framework CDN to something like Bootstrap, the checkboxes do appear.
For those interested, here's the Leaflet code for debugging purposes: http://leafletjs.com/reference-1.0.0.html#layergroup
// defining items to toggle
var myItems = new L.LayerGroup();
// binding popup to each item once checkbox is selected
L.marker([lat, lon]).bindPopup('Item').addTo(myItems);
// creating overlays with multi-checkbox selection
var overlays = {
Items: myItems
};
// adding overlays to the map
L.control.layers(null, overlays).addTo(map);
This issue seems specific to Leaflet and does not occur with other CSS frameworks.
If anyone has a fix for this problem, your help would be greatly appreciated!
Thank you