 if (activeTooltip) {
            activeTooltip.setLatLng(latlng); // Update the tooltip position
        }
        }

        // Function to handle mouseout event
        function onFeatureMouseOut(e) {
        if (activeTooltip) {
            map.removeLayer(activeTooltip); // Remove the tooltip
            activeTooltip = null; // Reset the active tooltip
        }
        }

        // Attach event handlers to the vector grid
        vectorGrid.on('mouseover', onFeatureMouseOver);
        vectorGrid.on(