npm jsvectormap 1.5.0
v1.5.0

latest releases: 1.6.0, 1.5.3, 1.5.2...
2 years ago

v1.5.0

  • feat(events): onRegion/MarkerClick support (#29)
  • fix: shaky click selects a region (#47)
  • fix: lines reposition fails
  • refactor: improve the destroy method
  • refactor: build an abstract class for components
  • refactor: improve consistency & remove addMarker entirely
  • feat: ability to remove a line or multiple lines
  • refactor: better name conventions (#86)
  • refactor: move elements to components (#81)
  • refactor: get selector from merged options directly
  • fix: too much recursion error (#75) (#76)
  • feat(lines): ability to remove lines (#72)
  • fix(typo): 'tranparent' typo in default options (#71)

Release Notes

Starting from v1.5.0 the addLine and removeLine are deprecated and will be removed soon, as an alternative please use addLines and removeLines.

Adding lines

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' },
])

Removing lines

// ❌ 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' }])

Don't miss a new jsvectormap release

NewReleases is sending notifications on new releases.