NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
A lightweight Javascript library for creating interactive maps
Last release 1 years ago
30 May 2025
Release timing varies
gaps range from 3 weeks to 1.2 years
Some releases are documented
notes for 12 of 28 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
28 releases · first in 2020
One column per quarter.
refactor: replace deprecated pageY/XOffset with scrollY/X
feat(maps): create the build maps script
Removed js and css from dist folder, so if you're importing jsvectormap from dist/js/jsvectormap.js it becomes dist/jsvectormap.js and css as well.
<!--
/dist/js/jsvectormap.js -> /dist/jsvectormap.js
/dist/js/jsvectormap.min.js -> /dist/jsvectormap.min.js
/dist/js/jsvectormap.css -> /dist/jsvectormap.css
/dist/js/jsvectormap.min.css -> /dist/jsvectormap.min.css
-->Another thing is, when you add a particular style per marker please specify the case you want to apply the style for eg initial, hover, selected and selectedHover.
const map = new jsVectorMap({
markers: [
{
name: 'Palestine',
coords: [31.9522, 35.2332],
// ❌ This isn't gonna work anymore
style: { fill: 'red' },
// ✅ Instead, style the marker based on its case.
style: {
initial: {
fill: 'red'
},
// etc...
hover: {}
}
}
]
})fix: dragging doesn't work on mobile devices
fix(markers): get/clear selected markers
fix: add ability to customize circled markers
Starting from v1.5.0 the addLine and removeLine are deprecated and will be removed soon, as an alternative please use addLines and removeLines.
Starting from v1.5.0 the addLine and removeLine are deprecated and will be removed soon, as an alternative please use addLines and removeLines.
const map = new jsVectorMap({})
// ❌ Avoid this in the future versions.
map.addLine()
// ✅ Use `addLines` method to add a line or multiple lines.
map.addLines({ from: 'Palestine', to: 'Ukraine' })
map.addLines([
{ from: 'United States', to: 'Egypt' },
{ from: 'Palestine', to: 'Ukraine' },
])// ❌ Avoid this in the future versions.
map.removeLine('United States', 'Egypt')
// ✅ Use `removeLines` method to remove multiple lines or all lines.
map.removeLines()
map.removeLines([{ from: 'United States', to: 'Egypt' }])Starting from v1.5.0 the addLine and removeLine are deprecated and will be removed soon, as an alternative please use addLines see docs and removeLines see docs.
Events onRegionTooltipShow and onMarkerTooltipShow will receive the native event as the first argument.
const map = new jsVectorMap({})
// ❌ Avoid this in the future versions.
map.addLine()
// ✅ Use `addLines` method to add a line or multiple lines.
map.addLines({ from: 'Palestine', to: 'Ukraine' })
map.addLines([
{ from: 'United States', to: 'Egypt' },
{ from: 'Palestine', to: 'Ukraine' },
])
// ❌ Avoid this in the future versions.
map.removeLine('United States', 'Egypt')
// ✅ Use `removeLines` method to remove multiple lines or all lines.
map.removeLines()
map.removeLines([{ from: 'United States', to: 'Egypt' }])
// Events
const map = new jsVectorMap({
...
onRegionTooltipShow(event, tooltip, index) {
// ..
}
onMarkerTooltipShow(event, tooltip, index) {
// ..
}
...
})
fix: jsvectormap constructor is not accessible
fix: lines position fail when zooming in/out
refactor: switch addMap, maps, defaults to static
All other maps except world and world_merc are ignored from the npm package, but it's available on Github, you can download these maps from Available maps page.
v1.4.2 fix: tooltip not destroyed
Nothing published for this version
refactor: drop dom handler class
The map container was an instance of a custom class in early versions, now it's just a DOM element.
const map = new jsVectorMap({
onLoaded: (map) => {
// ❌ Won't work anymore.
map.container.delegate(".jvm-region", "click", (event) => {
// ..
})
// ✅ You will need to define your own event listener, example
map.container.addEventListener('click', (event) => {
if (event.target.matches('.jvm-region')) {
// Do something
}
})
}
})In early versions the map container was an instance of a custom dom handler class that contains a delegate method, now it's just a DOM element, so the delegate method won't be available anymore.
const map = new jsVectorMap({
// ...
onLoaded: (map) => {
// ❌ Won't work anymore.
map.container.delegate('.jvm-region', 'click', (event) => {
// ..
})
// ✅ You will need to define your own event listener, example
map.container.addEventListener('click', (event) => {
if (event.target.matches('.jvm-region')) {
// Do something
}
})
},
// ...
})
The tooltip also was a DomHandler instance, now it's a Tooltip instance which implements these methods getElement, show, hide, text, css.
const map = new jsVectorMap({
// ...
onMarkerTooltipShow(tooltip, index) {
// ❌ Won't work anymore.
const element = tooltip.selector
// Do something with the tooltip DOM element..
// ✅ If you need the tooltip DOM element, you can access it like so:
const element = tooltip.getElement()
// Do something with the tooltip DOM element, or..
// tooltip.css({ backgroundColor: 'red' })
// tooltip.text('Hello')
},
// ...
})
fix: dragging the map selects the region
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →