Valid keys for config are:
world: a JavaScript object representing TopoJSON data (not JSON data); defaults to no value, which will cause the plugin to load data from the file configuration optionfile: the path to a TopoJSON data file to be loaded via Ajax; defaults to "world-110m.json", which can be downloaded with the Planetary.js library from the download page.file: the path to a TopoJSON data file to be loaded via Ajax; defaults to "world-110m.json", which can be downloaded with the Planetary.js library from the download page.If you plan on creating more than one planet from the same TopoJSON data, you can load the data once before loading the plugin and pass the parsed data to the plugin via the world property rather than letting the plugin load the data via Ajax each time a new planet is created.
Once you've downloaded Planetary.js, you can include it via a script tag on your page after the inclusion of D3 and TopoJSON. This example uses the CDN URLs for those libraries:
Once you've downloaded Planetary.js, you can include it via a script tag on your page after the inclusion of D3 and TopoJSON. This example uses the CDN URLs for those libraries:
If you use the default topojson plugin (most people will), you'll also need to make sure world-110m.json (or some other TopoJSON data file) is available on your server. This file is also available from the download page. See the TopoJSON Plugin documentation for more information.
If you use the default topojson plugin (most people will), you'll also need to make sure world-110m.json (or some other TopoJSON data file) is available on your server. This file is also available from the download page. See the TopoJSON Plugin documentation for more information.
planetaryjs.noConflict()
In non-AMD and non-CommonJS environments, Planetary.js takes over the global planetaryjs namespace (in the browser, this means window.planetaryjs). If, for some reason, something else useful was there before you loaded Planetary.js, you can ask for it to be returned to that spot by calling planetaryjs.noConflict(). The Planetary.js library will be returned from the function, so you can continue to use the library.
Download the core Planetary.js library and supporting files here.
+ +Up-to-the-minute releases, archived versions, and full release notes can be found on the GitHub releases page.
+ + +