New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

d3-world-maps

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-world-maps

Barebone world map template build for displaying data

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-46.43%
Maintainers
1
Weekly downloads
 
Created
Source

D3 World Maps Template

This library was built to promote data sharing on a global scale.

How it works

In your html, you must create an element with an id of 'world-map' or create a custom class or id to select. Specify the dimensions here with height & width attributes.

<body>
  <div class='world-map' width='500' height='500'> </div>
</body>

Install

npm install d3-world-maps

Make a Map

ES6

import * as d3WorldMaps from 'd3-world-maps';

CommonJS

var d3WorldMaps = require('d3-world-maps'); 

Initiate Map


var map = new d3WorldMaps.WorldMap(
  {
    el: '.world-map', // where the Map Lies
    projection: 'Mercator',
    locationPins: [
      {coords: [55, 55],  opacity: 0.2},
      {coords: [13, 13], radius: 4},
      {coords: [12, -45], color: 'yellow', radius: 4, opacity: 0.7}
    ],
    oceanFill: 'black'
);
map.init();

Options


const defaultOptions = {
  el: '#world-map',
  landFill: 'orange',
  projection: 'Orthographic',
  oceanFill: '#0e1e32',
  locationPins: null
};

Credits

The Orthographic xyz axis drag functionality was inspired by: Rotate the World

TopoJson was created using world-atlas

Workflow inspired by react-serial-forms

Keywords

FAQs

Package last updated on 27 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc