Skip to content

ewaldc/mapsforge-tile-server

 
 

Repository files navigation

Deprecated: Please use awesome komoot (and Wahoo Elemnt instead of Garmin).

Mapsforge Tile Server — serve Mapsforge maps. So any application can load tiles from your map and your preferred render theme.

Main purpose of this project — ability to use excellent beautiful detailed Elevate theme not only in Android OS.

Latest release

Modified mapsforge 'dev' (0.5) version used because in this version label clipping was partially fixed.

Features

  • Tiles in the WebP image format if supported by browser and server (currently, only Mac OS X and Linux 64-bit supported as server platform — under Windows/other platforms only PNG (feel free to open issue)).
  • Multimap (you can specify folder of maps or several map files).

Public instance and demo

For personal usage you can use public mapsforge tile server instance instead of setting own.

var mapsforgeAttribution = '&copy; <a target="_blank" href="http://www.openandromaps.org/en/disclaimer">OpenAndroMaps</a>';
var mapsforge = L.tileLayer('http://{s}.tile.develar.org/{z}/{x}/{y}', {
  maxZoom: 21,
  attribution: 'tiles ' + mapsforgeAttribution
});

Coverage is limited currently, feel free to open issue. Covered countries:

Usage policy the same as OSM.

Usage

Usage: ./bin/mts [ console {options} | 
                   start {options} | stop | restart {options} | 
                   condrestart {options} | status | install | remove | dump ]

Commands:
  console      Launch in the current console.
  start        Start in the background as a daemon process.
  stop         Stop if running as a daemon or in another console.
  restart      Stop if running and then start.
  condrestart  Restart only if already running.
  status       Query the current status.
  install      Install to start automatically when system boots.
  remove       Uninstall.
  dump         Request a Java thread dump if running.
  
Options:
 --map (-m) <path1>[,<path2>,...]     : Map files (see http://www.openandromaps.org/en/downloads)
 --theme (-t) <path1>[,<path2>,...]   : Render themes (see http://www.openandromaps.org/en/legend), 
                                        file (renderThemes/Elevate/Elevate.xml) or folder (renderThemes)     
 --port (-p)  <int>                   : Port, default 6090 
 --host (-h) VAL                      : Host, default localhost
 --max-file-cache-size (-cs) <double> : Maximal file cache size in GB, limit is
                                        not strict, actual size might be 10% or
                                        more bigger. Set -1 to unlmited

Only --map option is required. Elevate theme will be used by default.

Several maps

./bin/mapsforge-tile-server.sh --map ~/maps/Alps.map,~/maps/Germany.map

or

./bin/mapsforge-tile-server.sh --map /path/to/maps

Nginx

See nginx configuration example.

About

Mapsforge Tile Server — serve Mapsforge maps.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 97.8%
  • Dockerfile 1.5%
  • Other 0.7%