Have issues trying to get highlight function to work when splitting up a GeoJSON file in several layerGroups, tried to put in "var distance" but that did not work. The GeoJSON has multi polygons and I want to use the "function highlight" for showing the polygon that is clicked on as lots of polygons overlap each other and it can be hard to differentiate the polygon borders. I manage to do single layerGroup but would like it to work also with multiple layerGroups.
Have issues trying to get highlight function to work when splitting up a GeoJSON file in several layerGroups, tried to put in "var distance" but that did not work. The GeoJSON has multi polygons and I want to use the "function highlight" for showing the polygon that is clicked on as lots of polygons overlap each other and it can be hard to differentiate the polygon borders. I manage to do single layerGroup but would like it to work also with multiple layerGroups.
Below is the code i'm trying with...