0

The question is the one in the title... is it possible to change the default checkbox in leaflet? in that case, how? Im using StyledLayerControl, Here is the line of css where i edit the menu with checkbox

    .menu-item-checkbox{
    font-family: 'Open-Sans', Arial, sans-serif;
    font-size: 12px;
  color: #d5e8ee;
}
0

I figured it out my self, add this line of code to the leaflet.css

    input[type="checkbox"] {
    opacity: 0;
    left: 19px
}
    input[type=checkbox] + label {
            background: url('./images/check1.png') no-repeat;
            padding-left: 23px;
      padding-top: 1px
    }
    input[type=checkbox]:checked + label {
        background: url('./images/check2.png') no-repeat;
        padding-left: 23px;
        padding-top: 1px
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.