Skip to content

langateam/node-mapnik

 
 

Repository files navigation

node-mapnik

Bindings to Mapnik for node.

NPM version Build status Dependency Status

Install

We do not provide pre-built binaries; rather, we've tested compilation on a few common platforms:

Ubuntu 12.04 and 14.04

1. Install apt packages

# install apt sources
sudo apt-get install curl software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:mapnik/nightly-trunk
sudo apt-get update

# install mapnik libs
sudo apt-get install libmapnik libmapnik-dev mapnik-input-plugin-gdal mapnik-input-plugin-postgis mapnik-utils mapnik-vector-tile libstdc++-5-dev clang-3.8 make  

2. Setup environment

export CXX=clang++-3.8
export CC=clang-3.8

OSX

1. Install brew packages

brew install freetype harfbuzz libpng libtiff proj icu4c jpeg webp boost gdal postgresql cairo llvm37

2. Set Environment Variables

export CXX="clang++ -stdlib=libc++"
export CXXFLAGS="$CXXFLAGS -nostdinc++ -I/usr/local/opt/llvm37/lib/llvm-3.7/include/c++/v1"
export LDFLAGS="$LDFLAGS -L/usr/local/opt/llvm37/lib/llvm-3.7/lib"

2. Compile mapnik

git clone https://github.com/mapnik/mapnik.git
cd mapnik
git checkout v3.0.9
git submodule update --init
./configure
make
sudo make install

npm install @langa/mapnik

What is this Fork?

node-mapnik module is really difficult to install properly, and bad patch versions have broken our builds in the past. We will keep this module up-to-date with the upstream work to the extent it does not cause more build/install failures.

License

BSD

Maintained By

Packages

No packages published

Languages

  • C++ 55.5%
  • JavaScript 41.9%
  • Shell 0.8%
  • Batchfile 0.7%
  • Python 0.6%
  • HTML 0.2%
  • Other 0.3%