Skip to content

mgax/haihui

Repository files navigation

haihui

Collection of hiking maps, optimized for mobile use, based on OSM data.

screenshot

Setup

npm install
gulp
gulp devel

Ubuntu tips

sudo apt-get install python-gdal gdal-bin
npm install -g topojson

DEM

Create map for specific region, eg. for Piatra Craiului (crai):

gulp data-crai # "crai" is the region name

How it works

For each region, we query Overpass, filter the results, and convert them to TopoJSON. Elevation contours are from SRTM. We then package all data for a region as JSON, the largest is almost 1MB, and they compress to ~30% of the original size with gzip. In the browser, we save the data in appcache, and render the map as SVG, using D3.js and lots of creativity :)

License

Code is licensed as MIT. Data is © OpenStreetMap contributors, except for contour lines, which come from NASA's SRTM dataset.