mapnik
There are better solutions, use openlayers or see graphhopper for alternatives
This is when I started the web site and new code.
openstreetmap website
The main trigger to do this was that google maps only allowed me 1 request per day before I registered a billing account. It was still free but I really wanted to have a backup. Also it might be better to have a different 'face' than google for some applications.
The build status of openstreetmaps is here : https://travis-ci.org/openstreetmap There are a number of packages there, but the website itself is of course openstreetmap-website and you can get it with :
| changetitle | |
|---|---|
However, the last time I tried it timed out, so maybe you can download the tar from : https://github.com/openstreetmap/openstreetmap-website If you follow the INSTALL Guide there you end up with a fully functional clone of the openstreetmap website that also get's it's tiles from an openstreetmap server.
source
Best starting point : https://github.com/mapnik/mapnik/wiki
Since the installation of the website mentions mapnik and faster ways of importing the data. openstreetmap is a rigid site made for editing networks. It uses mapnik and that's the level I need. Mapnik mentions sqlite3 at installation, but as far as I can see it is only an option. One I do not want to use because of the horrible speeds. However, mapnik needs a lot more manual work, since it just generates tiles into png files. This links is the best starting point : https://switch2osm.org/serving-tiles/manually-building-a-tile-server-12-04/ Skip that, newer versions are available, so take :
https://switch2osm.org/manually-building-a-tile-server-18-04-lts/
Some versions on that site are older, so here is mu install history:
Sadly the way we compiled mapnik above leads to errors such as :
Error
failed to initialize projection with: '&srs900913;'
But since I already did all of that, I left the description. Which seems to be caused by the xml library, so this command fixed it :
Filling the database
Install osm2pgsql from source, since the package one is likely outdated.
| changetitle | |
|---|---|
Install mod_tile
| changetitle | |
|---|---|
Changes settings in renderd.conf
| changetitle | |
|---|---|
Test the server with :
| changetitle | |
|---|---|
Browse to http://192.168.2.49/osm_tiles/0/0/0.png
To test this with live tiles first tail the output of
| changetitle | |
|---|---|
So you can watch the TILEs being generated. Then open up this file on you local machine and make the url point to the server and url just installed :
The setView is set to zoom out around Netherlands. Open it with chrome and you can start browsing. Note that new tiles will take some time to render.