score:1

Accepted answer

you should update the cx and cy values in your zoom function:

function zoom() {

    svg.select(".x.axis").call(xaxis);
    svg.select(".y.axis").call(yaxis);

    svg.selectall(".dot")
    .attr("cx", function (d) {
    return xscale(d.lng);
    })
    .attr("cy", function (d) {
    return yscale(d.alt);
});

}

Related Query