I have a strange issue with my Leaflet/Javascript code. I\'m trying to refactor my application which was initially getting line data from PostGIS as a certain layer checkbox has