Giter Site home page Giter Site logo

Comments (2)

ka7eh avatar ka7eh commented on August 21, 2024

@HerminioSabino you should be able to customize the header for each section using css. For sub-items of each layer, you can define their styling when initializing the control.

Check out the examples to see how you can configure the legend control:
https://consbio.github.io/Leaflet.HtmlLegend/
https://github.com/consbio/Leaflet.HtmlLegend/blob/master/index.html

If none of the examples work for you, please post a sketch of what you are trying to achieve so I can point you to the relevant config.

from leaflet.htmllegend.

HerminioSabino avatar HerminioSabino commented on August 21, 2024

First of all, thank you very much for the feedback,

Here is the example I need,
I can already separate my layers for groups, but in the image I am sending is an example with only one layer.
I want the layer control to contain only the name, and the symbology is as in the examples you sent. In my case I want to take advantage of the symbology that is already defined in the layer.
As I use the Qgis plugin (QGIS2web), it already returns the code (attached). where symbology is defined by
function style_24MEE250GC_SIR_0_0.
I want, if possible, to use this style wherever you put it.

**style: {

                     'background-color': 'green',
                     'width': '10px',
                     'height': '10px'**
I am attaching two images and also the folder with the small example.

I do not know if I explained it well, but I would like a lot of help, since it is an important step for my graduation.

img2
img 1

QGIS.zip

from leaflet.htmllegend.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.