Redraw heatmap fixed to not append layers and js functions