I am trying to pass a parameter to bind it with click on a polygon, I have the following:
var mapLayer = new L.TopoJSON(jsonMap, {style: style, onEachFeature: onEachFeature.bind(null,null,selectionManager), pane:'borders'}).addTo(this.map);
function onEachFeature(feature, layer, selectionManager) {
console.log(selectionManager)
layer.on({
mouseover: highlightFeature,
mouseout: resetHighlight,
click: dataFilter.bind(null,ID)
});
}
function dataFilter(selectionManager,e){
var layer = e.target;
var zoneName = layer.feature.properties.Index;
console.log(zoneName)
console.log(selectionManager);
}
So my goal here is to read a parameter in dataFilter (which is in this case selectionManager)