0

I am attempting to check whether I could correctly implement d3Vienno's code (http://www.youtube.com/watch?v=lJgEx_yb4u0) from his d3.js Map Tutorial with geoJSON for NYC. However, my Gist is failing to properly display the map, and no errors are being thrown, as you can see here: http://bl.ocks.org/jcahan/0a25ae5f5018fc6d28c7.

I would very much appreciate any recommendations as to why this might not be working. I suppose it could be due to a lack of styling, but I am not sure.

NumenorForLife
  • 1,736
  • 8
  • 27
  • 55

1 Answers1

0

You should use transform of SVG to translate and scale the SVG groups back to the screen. This can be further be done by using d3.geo.bounds()

  • thank you for your recommendation. I did try debugging it via the Chrome's Developer's Javascript Console. Would you mind pointing me in the right direction regarding how to do this? I am not quite sure why the svg groups aren't automatically within the scope of the page. – NumenorForLife Jul 10 '13 at 16:40
  • ref to [translate](https://github.com/mbostock/d3/wiki/Geo-Projections#wiki-translate) and [scale](https://github.com/mbostock/d3/wiki/Geo-Projections#wiki-scale) –  Jul 10 '13 at 16:50