title: Error - Zoom in D3 map - d3.behavior is undefined
body: <p>I've started to study D3 a few days, and I'm trying to add a zoom feature for a map that I did.</p>
  <p>I'm using <a href="https://bl.ocks.org/mbostock/8fadc5ac9c2a9e7c5ba2" rel="nofollow noreferrer">this example as a basis</a>, but when I try to adapt to my map I receive this error, and my map disappears</p>
  <pre><code>TypeError: d3.behavior is undefined
  </code></pre>
  <p>Here is my code:</p>
  <pre><code>var projection = d3.geoMercator()
      .translate([width / 2, height / 2])
      .scale((width - 1) / 2 / Math.PI);
  
  var zoom = d3.behavior.zoom()
      .scaleExtent([1, 8])
      .on(&quot;zoom&quot;, zoomed);
  
  var path = d3.geoPath().projection(projection);
  
  var svg = d3.select(&quot;#map&quot;)
      .classed(&quot;svg-cont&quot;, true)
      .append(&quot;svg&quot;)
      .attr(&quot;preserveAspectRatio&quot;, &quot;xMinYMin meet&quot;)
      .attr(&quot;viewBox&quot;, &quot;0 0 560 350&quot;)
      .classed(&quot;svg-content-responsive&quot;, true)
      .append(&quot;g&quot;);
  
  svg
      .call(zoom)
      .call(zoom.event);
  </code></pre>
  <p>And below</p>
  <pre><code>function zoomed() {
      g.attr(&quot;transform&quot;, &quot;translate(&quot; + d3.event.translate + &quot;)scale(&quot; + d3.event.scale + &quot;)&quot;);
  }
  </code></pre>