     showLocation()
     renderScale()
 
+  updateProjection = (new_sc, new_tr) ->
+    sc = new_sc
+    tr = new_tr
+    projection
+        .scale(s0 * sc)
+        .translate([t0[0] * sc + tr[0], t0[1] * sc + tr[1]])
+
   zoom.on 'zoom', ->
-    tr = d3.event.translate
-    sc = d3.event.scale
+    updateProjection(d3.event.scale, d3.event.translate)
     render()
     updateSymbols()
     showLocation()


    projection.translate(t0 = [width / 2, height / 2])

    zoom.scale(sc = 1).translate(tr = [0, 0])

    actionbar.attr('transform', "translate(0, #{height - ACTIONBAR_HEIGHT})")
    actionbar.select('.background').attr('width', width)

      .attr('class', (d) -> "highway highway-#{d.properties.grade}")

  render = ->
    segments.selectAll('.segment')
        .attr('d', path)

