https://github.com/spencermountain/somehow-maps
make a map without thinking
https://github.com/spencermountain/somehow-maps
Last synced: 11 days ago
JSON representation
make a map without thinking
- Host: GitHub
- URL: https://github.com/spencermountain/somehow-maps
- Owner: spencermountain
- Created: 2018-12-18T19:23:55.000Z (over 6 years ago)
- Default Branch: gh-pages
- Last Pushed: 2023-03-04T03:38:42.000Z (about 2 years ago)
- Last Synced: 2025-03-25T15:14:12.723Z (29 days ago)
- Language: JavaScript
- Homepage: http://spencermounta.in/somehow-maps
- Size: 20.5 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
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!**```js
import { Globe, Line, Graticule, Dot, Latitude } from 'somehow-map'
```

### Components
these two are the containers, and should be mostly interchangeable
- ``
- ``
both of these accept a 'focus' param, what zooms the map projection to fit a geojson object.these are the basic primitives
- ``
- ``
- ``these are continual lines around the whole world:
- ``
- ``these are some helpers
- ``
- ``
- ``### Misc
to generate ad-hoc topojson shapes (without using QGIS):
- grab shapefiles from [natural earth](https://www.naturalearthdata.com/downloads/)
- draw a new shape in [geojson.io](http://geojson.io)
- add them both to [mapshaper.org](https://mapshaper.org/)
- run `mapshaper -clip myshape.geojson`
- export as **topojson**---
to generate ad-hoc topojson shapes from openstreetmap:
- download some pbf data from [geofabrik.de](http://download.geofabrik.de/)
- use James Halliday's nodejs [pbf parser](https://github.com/substack/osm-pbf-parser) to filter down [specific tags](https://wiki.openstreetmap.org/wiki/Key:amenity)
### See also
- [somehow](https://github.com/spencermountain/somehow)
- [thensome.how](https://thensome.how)MIT