Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.84 KB

README.md

File metadata and controls

55 lines (36 loc) · 1.84 KB

Web interface to Direction Maps Rendering

To run this, clone these three projects and move them into a file structure like this:

Then run node index.js in the DirectionMaps-web folder.

If done correctly, you should be able to open http://localhost:3000/ and see a map where you can start generating direction maps. API calls can be made to http://localhost:3000/map?lon=7.64519&lat=51.92906. Tthere must be OSM & routing data for these coordinates in your database. You will see some output on the command line and eventually a rendered image in the browser.

Docker file usage

Probably the easiest way to run this whole project is using the Dockerfile. Put your database credentials into config.xml first (example file provided).

Build using docker build:

sudo docker build -t dirmaps .

If you are using a proxy you will need to add some --build-args:

docker build --build-arg https_proxy=$https_proxy --build-arg HTTPS_PROXY=$HTTPS_PROXY --build-arg http_proxy=$http_proxy --build-arg HTTP_PROXY=$HTTP_PROXY -t dirmaps .

Run:

sudo docker run --name=directionmaps -p 3000:3000 -i -t dirmaps

Stop:

sudo docker stop directionmaps

Remove:

sudo docker rm directionmaps

Notice about openjdk 8 and Docker 1.9.1

There is a bug that will prevent Docker from running the necessary step ca-certificates-java.postinst configure. To fix this you can to update the hosts's kernel, in Ubuntu you will need to add a PPA:

sudo add-apt-repository ppa:chiluk/1533043
sudo apt-get update
sudo apt-get upgrade