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",
iconSize: [35, 45],
shadowSize: [36, 16],
iconAnchor: [17, 42],
shadowAnchor: [10, 12],
popupAnchor: [1, -32]
}
});
var blueIcon = new LeafIcon({iconUrl: 'blue.png'});
var greenIcon = new LeafIcon({iconUrl: 'green.png'});
var yellowIcon = new LeafIcon({iconUrl: 'yellow.png'});
var orangeIcon = new LeafIcon({iconUrl: 'orange.png'});
var redIcon = new LeafIcon({iconUrl: 'red.png'});
The icons represent the construction conditions.
Would it be possible to count the number of occurrences for each icon as the overlayMaps are selected? With the result, you need to make a legend with the result and rename the icons to appear, for example: Blue 5 occurrences, Green 2 occurrences, Yellow 12 occurrences, Orange 0 occurrences and Red 21 occurrences.
I appreciate the help.
Weslley Morais is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.