function updatePOI()

in website/src/MapPage/map.js [385:403]


    function updatePOI(point) {
        Plotly.restyle(divName, { 'x': [[point[0]]], 'y': [[point[1]]] }, 1).catch(function(e) {});
        let roundedX = Math.round(1000.0*point[0])/1000.0;
        let roundedY = Math.round(1000.0*point[1])/1000.0;
        stateHolder.setState({
            cursorPoint: [roundedX,roundedY]
        });
        Plotly.relayout(divName, { 'shapes': getLinesToNeighborsOnPlot(point) });
        const distancesAndIds = getNearestNeighborsOnPlot(point).map(nn =>
            [calculateDistance(nn.slice(0, 2), point), paintingIds[nn[2]]]);
        const ids = distancesAndIds.map(p => p[1]);
        const distances = distancesAndIds.map(p => p[0]);

        const millisSinceLastCall = Date.now() - lastTimeCalled;
        if (millisSinceLastCall > TIME_TILL_CALL) {
            lastTimeCalled = Date.now();
            interpolateAndSet(ids, distances)
        }
    }