Hi all,
I created a fork of minetestmapper and added some functions I needed myself. I did a pull request on minetest/minetestmapper, but I closed it again, as I think I need to rework the code a bit.
The added functionality could be useful though, so I'll post a link here for anyone who wants to try:
https://github.com/wziard/minetestmapper
Quick example, generate a fully functioning slippy map in one command:
Code: Select all
minetestmapper -i input/ -o map.jpg --tilesize 1024x1024 --leaflet --buildpyramid --noemptyimage
This will generate (a lot of) tiles named '<zoom>_<x>_<-y>_map.jpg' and a html file named 'map.jpg.html'
copy all these to some folder on your webserver (or local machine of course) and add the leaflet.css and leaflet.js from the Leaflet/ subdir. Tadaa! working map.
The added flags are:
--tilesize WxH
tiled output. for if your map is too big to output in one go. Much faster than running minetestmapper in a loop with the --geometry option.
--leaflet
output tiles in a leaflet compatible format, and also output some ready-to use html just upload the tiles
and the html to your website to have a working slippy map.
--buildpyramid
when doing tiled output, will also generate downscaled tiles for leaflet so zooming out is faster.
known bugs/todo
-when one of the map dimensions is smaller than the tilesize, it crashes
-some variable names are re-used in an illogical manner.
Despite these minor bugs it works rather well at my site (sorry, private server used by my children, so I won't put a link here.)
I also already know how to fix those, but as I'm rather busy it'll be next week before I get around to doing it.
plan: (but no idea yet if feasible)
Make special sign nodes (maybe with some code in the sign) show up as markers on the map, so you can name stuff.