You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just upgraded the d3.js on my site to the latest 3.2.0 release. And I noticed that Alaska and Hawaii are showing up as rectangles in maps implemented using a FeaturesCollection json file. They are not rendering according to the MultiPolygon coordinates in the json file.
That example appears to contain three tiny counterclockwise polygons, which D3 treats as covering most of the sphere. In version 3.2, we modified the clockwise/counterclockwise detection slightly to be more accurate.
An example offending polygon appears in Virginia (as part of a MultiPolygon):
At first glance, you might expect it to have zero area because the latitudes are all equal, but line segments are geodesics in D3, thus it actually has non-zero, negative area, which we treat as counterclockwise.
Leaving this open so @mbostock knows to update the example; I’d recommend using TopoJSON e.g. as used by more recent examples.
I just upgraded the d3.js on my site to the latest 3.2.0 release. And I noticed that Alaska and Hawaii are showing up as rectangles in maps implemented using a FeaturesCollection json file. They are not rendering according to the MultiPolygon coordinates in the json file.
I'm basically using the same code as this example, http://bl.ocks.org/mbostock/2206590, which is also showing the same problem.
The text was updated successfully, but these errors were encountered: