Skip to main content

Create static map images with markers, geodesic lines, ...

Project description

Build Status


  • Markers
  • Geodesic lines
  • Automatic guessing of the maps center and zoom (based on added objects)
  • Full anti-aliasing of drawn objects (via cairo)
  • Caching of tile images


StaticMapMaker is available as a Python package, which can be installed via pip:

pip install staticmapmaker

All the rendering is done with pycairo which depends on the cairo libraries (Ubuntu package: libcairo2-dev).


import staticmapmaker as sm

ctx = sm.Context()
ctx.add_object(sm.Marker(sm.latlng(12, 34)))
ctx.add_object(sm.Line([sm.latlng(12, 34), sm.latlng(12.5, 34.5)]))
image = ctx.render(800, 600)

See the examples directory for more detailed usage examples.

Setting-Up a Development Environment

(Instructions for Ubuntu)

sudo apt-get install libcairo2-dev

git clone

cd staticmapmaker

virtualenv -p python3 env
source env/bin/activate

pip install -r requirements.txt -r requirements-dev.txt

# run linter (flake8)
make lint

# run unit-tests (pytest)
make test

# run example scripts
PYTHONPATH=. examples/
PYTHONPATH=. cli/ --help


Copyright 2017 Florian Pigorsch & Contributors. All rights reserved.

Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for staticmapmaker, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size staticmapmaker-0.1.2-py3-none-any.whl (13.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size staticmapmaker-0.1.2.tar.gz (10.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page