rties.id)]
                    }
                );
            }
        });

        map.on('mouseleave', 'tracks-layer', function (e) {
            map.getSource('mouseoversource').setData({
                    type: 'FeatureCollection',
                    features: []
                }
            );
        });
    }

    function findClosestLineString(point, lineStrings) {
        let closestLineString = null;
        let minDistance = Infinity;

        lineStrings.forEach(lineString => {
          