Mapnik with Python and Node bindings in a box!
3
Mapnik Docker container with Node and Python bindings
:exclamation: Ensure your Docker build environment, be it a VM (if you use Docker for Mac or Windows) or bare metal, has at least 4 gigabytes of memory. Any less and you'll have to enjoy hella swapping.
docker build -t mapnik .. It will take a long while, so best get another coffee./opt/node-mapnik contains the Node bindings.npm linked, so any apps requiring them should be able to just npm link mapnik./opt/python-mapnik contains the Python bindings.pip install -e /opt/python-mapnik is likely your best bet.--system-site-packages your virtualenv or don't use a virtualenv at all.The basic Python world-rendering script is installed in /opt/demos/world.py.
cd /opt/demos; python2 world.py to try that Python 2.x works.cd /opt/demos; python3 world.py to try that Python 3.x works.world.png. You can use docker cp to look at it.The Node.js "render a map from a stylesheet" demo is installed in /opt/demos/world.js.
cd /opt/demos; npm i mapnik; node world.js to try it.
You'll get a crapload of deprecation warnings (see the related bug) since we're running Node 6,
but the script does output a map.png anyway. You can use docker cp to look at it.No tags have been pushed to this repository yet.