title: Transfer d3 v3 to v4 (projection)
body: <p>how could I transfer this code from v3 to v4 .the main goal of this code is adding a layer of paths over a google maps and combine the two projection together.
  I had the code before in v3 it was working fine .Now I need to upgrade it to V4.</p>
  
  <pre><code>d3.json("Export_Output_6_modified.json", function(error, jordanLevel2) {
        if (error) throw error
  
        //console.log(data[0].comuni[0].geometry.coordinates);
        var overlay = new google.maps.OverlayView();
  
        overlay.onAdd = function() {
  
          var layer = d3.select(this.getPanes().overlayLayer).append("div");//.attr("height",1000)
  
          overlay.draw = function() {
  
            layer.select('svg').remove();
  
            var w = 900;
            var h = 900;
  
            var color = ['#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00', '#ffff33', '#a65628', '#f781bf', '#999999'];
            var heat_color = d3.scaleLinear().domain([0, 1]).range(['#b2df8a', '#ff7f00']).interpolate(d3.interpolateHcl);
  
            var overlayProjection = this.getProjection();
            console.log(overlayProjection);
  
  
           // Turn the overlay projection into a d3 projection
             var googleMapProjection = d3.geoProjection(function(coordinates) {
              var googleCoordinates = new google.maps.LatLng(coordinates[1], coordinates[0]);console.log(googleCoordinates);
              var pixelCoordinates = overlayProjection.fromLatLngToDivPixel(googleCoordinates);console.log(pixelCoordinates );
              return [pixelCoordinates.x, pixelCoordinates.y];
            });
  
          var path = d3.geoPath(googleMapProjection);
  
  
            var svg = layer.append("svg")
              .attr('width', w)
              .attr('height', h)
  
            var g = svg.append('g')
              .attr("id", "mapGroup");
  
  
            g.selectAll("path")
              .data(jordanLevel2.features)
              .enter()
              .append("path")
              .attr("d", googleMapProjection)
              .attr('class', 'state selected')
              .style("fill", function(d, i) {
                return color[i % color.length];
              })
              .style('opacity', .7);
  
          }
        }
        overlay.setMap(map);
  
      });
  </code></pre>
  
  <p>I tried to change geo.path to geoPath, also I transferred most of the code to v4 put still gives me an error any suggestion ?</p>