![]() |
VOOZH | about |
The JavaScript D3.js library provides interactive data visualizations for web page using HTML5, Scalable Vector Graphics, and Cascading Style Sheets. The geoNaturalEarth2() function in d3.js is used to draw the Natural Earth II projection which Compared to Natural Earth I is slightly taller and rounder.
Syntax:
d3.geoNaturalEarth2()
Parameters: This method does not accept any parameters.
Return Value: This method creates the Natural Earth II projection from given JSON data.
Example 1: The following example creates NaturalEarth II projection of world with center at (0, 0) and no rotation.
Output:
Example 2: In following example we will create NaturalEarth2 projection of world with center at (0, 10) and rotating 60 degree with respect to Y axis.
Output: