All Questions
17
questions
0
votes
1
answer
31
views
Is it possible to count the occurrence number of a custom icon in Leaflet? If yes, how to do it?
Firstly, I'm a beginner, I've learned a lot from you.
I have 5 custom icons defined:
//Awesome icons
var LeafIcon = L.Icon.extend({
options: {
shadowUrl: "markers-shadow.png",
...
1
vote
1
answer
980
views
Hover over Element in Custom Leaflet Legend
I created a Leaflet Map with a Legend. The goal would be to hover over the text element in the legend area and show a tooltip with a image.
Problem: hover is not showing up! I tried very different ...
0
votes
1
answer
1k
views
How I can make a linear gradient legend using Leaflet
i asked this question on gis.stackexchange by they said i should ask here
I'm working on project that visualize solar energy data using Leaflet, I want to add a map legend when i add a lot of values ...
1
vote
1
answer
755
views
Leaflet: how can I display a marker or legend only on one layer?
I made a leaflet map with different layers which look like this:
L.easyButton('<span class ="buttons">Example </span>', function (btn, map) {
if (map.hasLayer(example1)) {
map....
0
votes
1
answer
701
views
Leaflet legends add and remove to connected layerGroup
I am able to change the legends (legend1 and 2) when adding the overlays (not base maps).
When adding overlay1_name the legend1 shows, but when removing overlay1_name the legend1 is not removed. ...
2
votes
0
answers
16k
views
How to add legend in Leaflet map?
I am trying to add a legend in my Leaflet map at the bottom right corner, Ive actually written the code halfway near the end of the code and I do not know how to continue, I want it displayed in the ...
1
vote
1
answer
1k
views
Create legend with different circle sizes in Leaflet
Good afternoon,
I am fighting with the leaflet legend dependant on the circle radius. Because I am going to have the values with the same colour, but different size. I would like to create legend ...
0
votes
0
answers
186
views
Leaflet: remove legendControl onclick
I have a leaflet map that should be updated onclick. Everything works less remove the previous legend. I have searched similar questions but I have not found a solution for me.
So, while onclick if ...
1
vote
1
answer
149
views
Delete "" from legend in Leaflet
Adding a legend to a Leaflet JS map works.
But inside the coloured boxes, there are those "" (double quotes) appearing:
How can I delete those?
Using:
function getColour(d) {
switch (d) {
...
0
votes
1
answer
2k
views
Legend Title in leaflet using GetLegendGraphic
Can anyone please explain me how to define legend title in javascript/leaflet using GetLegendGraphic for layers from Geoserver? I have tried many things, like:
Here I tried to make this rule in ...
1
vote
2
answers
4k
views
Can't get Leaflet legend to display properly
I'm trying to display what I assumed would be something trivial- display a legend on a leaflet map. But I've spent about 6 hours now trying to get it to work to no avail. All I want to do is display a ...
0
votes
2
answers
3k
views
Leaflet Legend not showing
Can someone tell what is wrong with the code? The legend, which is supposed to be the easiest part in not showing up and I cant figure out why. Maybe hidden in some other layer?
Following the ...
1
vote
0
answers
2k
views
Markers' colors legend in control layer - Leaflet
I have a map created based on this example:
http://leafletjs.com/examples/layers-control.html
I have more than 10 categories, so I would like to plot the color legend within the control layer ...
0
votes
0
answers
725
views
dynamic legend for tiles in Leaflet
Good day dear professionals!
I have a little problem. I started to learn javascript and leaflet not so much time ago, and now I can work with layers, but creating controls that I need is to hard for ...
0
votes
2
answers
3k
views
leaflet expand control and autoZindex
I am trying to keep my leaflet controls expanded and reverse the order it makes my base layers. Currently, the controls only open on hover, and it auto orders my layers 2009-2015. I would like them to ...