You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

jvectormap-next

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jvectormap-next

jQuery plugin for embedding vector maps with reach API and methods for data visualization to the web-pages.

3.1.2
latest
Source
npmnpm
Version published
Weekly downloads
18K
12.31%
Maintainers
1
Weekly downloads
 
Created
Source

jVectorMap is a vector-based, cross-browser and cross-platform component for interactive geography-related data visualization on the web. It provides numerious features like smooth zooming and panning, fully-customizable styling, markers, labels and tooltips.

You can find maps, documentation, examples and more at the official site

Example

var $ = require('jquery');

var $mountNode = $('[data-preview="jvectormap-next"] [data-testid="mountNode"]');
$mountNode.empty().css('height', 500);

// load jvectormap jquery plugin + map content
require('jvectormap-next')($);
$.fn.vectorMap('addMap', 'world_mill', require('jvectormap-content/world-mill'));

// render the map
var gdpData = {
    'AF': 16.63,
    'AL': 11.58,
    'DZ': 158.97,
    // ...
}

$mountNode.vectorMap({
    map: 'world_mill',
    series: {
        regions: [{
            values: gdpData,
            scale: ['#C8EEFF', '#0071A4'],
            normalizeFunction: 'polynomial'
        }]
    },
    onRegionTipShow: function(e, el, code){
        el.html(el.html()+' (GDP - '+gdpData[code]+')');
    }
});

// this is needed for the storybook to work properly
false

Keywords

map

FAQs

Package last updated on 18 Jul 2025

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