Git Product home page Git Product logo

mapline's Introduction

mapline

Create a collection of accurate maps in print quality along your gpx track, in your scale, your format and the infos you need.

Demo page

Features

  • Accurate scale throughout the whole route
  • Printable quality of 300dpi
  • Customizable paper format up to A2, page margins and distance markers

Inspired by the bikeline Cycling guides and Openstreetmap, this application uses Mapbox GL JS to create the maps I need. Vector tiles enable rendering in 300dpi, high enough for printing. There are different styles available. Paper format, page margins and distance markers are customizable. You want a map in 1:85.000 on A5 paper along that winding river? No problem.

Development

Logic and PDF generation of mapline are performed client-side. Main external libraries are Mapbox GL JS for map creation and jsPDF for PDF generation.

Before you can use mapline, you have to get your own Mapbox access token. Save it in src/mapboxtoken.js:

export default '<your access token here>';
  • npm install installs all needed dependencies
  • gulp watch starts a development server on localhost:9966
  • gulp bundle bundles everything in www/, ready to deploy

Limitations

An application written in Javascript, using WebGL and running entirely in the browser has of course some limitations.

  • canvas size and hence the maximum page format depend on your graphics card
  • Javascript engines have a hardcoded maximum string size. This limits the size of the output PDF to ~268.44MB

Missing features and nice-to-haves

Before this javascript implementation using vector tiles, I wrote a Python programm which rendered the maps from a local PostGIS database. It took ages, it had some features which are still missing in Mapline. This is what I want to implement in the future:

  • a map style better suited for cycle tours and printing in black&white
  • possibility to show points of views like drinking water or camping places
  • a scale bar
  • elevation stats and marking of steep slopes
  • support for additional/multiple gpx features besides tracks and routes

mapline's People

Watchers

James Cloos avatar Volker Hilsenstein avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.