Files
dotted-map-no-alaska/README.md
T

708 B

dotted-map-generator

Specs

const map = new DottedMap({
  height,
  width, // (one of both if enough)
  countries: ['FRA', { id: 'DEU', svgOptions: { color: 'blue' } }] // if not present, whole world is used
  region: { lat: {min, max}, lng: {min, max} }, // if not present, it fits the countries or the world
  grid: 'vertical' | 'diagonal',
})

// → it will cache the points array
DottedMap.clearCache()

map.addPin({
  lat,
  lng,
  svgOptions: { color, radius },
  data, // whatever you want
})

map.getPoints(): [{ x, y, data }]

map.getSVG({
  shape: 'circle' | 'hexagon' | 'square', // custom path is possible
  color,
  backgroundColor, // transparent is possible
  radius: 0.5,
})