5a12e6e2315e82298bbd1a463aa65355881a9154
Generate a world/countries map, add simple pins, svg with circles
dotted-map-generator
Specs
const map = new DottedMap({
height,
width, // (one of both if enough)
countries: ['FRA', 'DEU'] // if not present, whole world is used
region: { lat: {min, max}, lng: {min, max} }, // if not present, it fits the countries or the world
})
// → 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,
})
Description
Create futuristic SVG maps, Tron-like, filled with dots or hexagons (now with 100% less alaska!)
https://ntag.fr/tron-like-maps/
222 KiB
Languages
JavaScript
100%