Comments (2)
@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.
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.
from leaflet.htmllegend.
Related Issues (11)
- Missing from npm HOT 3
- Remove legend from control HOT 2
- allow no label and still have a collapsible item HOT 6
- allow disableVisibilityControls key for each legend entry HOT 3
- L.Control.HtmlLegend.js critical error at line 28 HOT 1
- Update to Leaflet 1.1 HOT 1
- Legend to collapse by default HOT 2
- Allow opacity slider to control fillOpacity HOT 4
- Control not working in IE 11 HOT 1
- caption from a layer (Sorted out)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet.htmllegend.