somehow-maps

1.1.0 • Public • Published
somehow-maps
— part of somehow
WIP svelte infographics
npm install somehow-maps

this library just hoodwinks some d3 projection methods into Svelte components -

  • so that basic SVG maps can be made in a leisurely way.
  • work-in-progress!
<script>
  import { Globe, Line, Graticule, Dot, Latitude } from 'somehow-map'
</script>
 
<Globe rotate={30} tilt={-10}>
  <Graticule />
  <Countries stroke="grey" />
  <Latitude at={40} />
  <Line from="toronto" to='jamaica' />
  <Dot at={[90, 0]} color="lightblue" radius={50} />
</Globe>

image

Components

these two are the containers, and should be mostly interchangeable

  • <Globe/>
  • <Map/> both of these accept a 'focus' param, what zooms the map projection to fit a geojson object.

these are the basic primitives

  • <Line from={[lat, lng]} to={'city-name'}/>

  • <Shape shape={geojson}/>

  • <Dot radius={4} at={'chicago'}/>

    these are continual lines around the whole world:

  • <Latitude/>

  • <Longitude/>

    these are some helpers

  • <Countries/>

  • <Graticule/>

  • <Intersections/>

Misc

to generate ad-hoc topojson shapes (without using QGIS):


to generate ad-hoc topojson shapes from openstreetmap:

See also

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i somehow-maps

Weekly Downloads

5

Version

1.1.0

License

none

Unpacked Size

2.77 MB

Total Files

45

Last publish

Collaborators

  • spencermountain