pyslip

A slipmap widget for wxPython 4


Keywords
python, wxpython, slipmap, map, python2
License
MIT
Install
pip install pyslip==4.0.5

Documentation

pyslip/examples/graphics/pyslip_logo.png

pySlip

The python 3, wxpython 4 version is at 'beta' stage and is available through PyPi.

pySlip is a 'slip map' widget for wxPython.

During my work writing geophysical applications in python I often wanted to display a map that was very large - many hundreds of thousands of pixels in width. I searched around for a GUI solution that would work rather like Google maps: tiled, layers, etc. I couldn't find anything that didn't assume browser+map server. So I wrote my own wxPython widget. This worked well for cartesian self-generated maps and has been extended to handle non-cartesian maps and tiles sourced from places like OpenStreetMap.

It's a poor thing, but solves my problem. I'm placing it here in the hope that someone else may find it useful. If you find it useful, or make improvements to it, drop me a line.

pySlip works on Linux and may work on Mac and Windows. It works with wxPython 4.0+ and Python 3.6+. It may work on earlier python 3 versions.

The widget API is documented in the wiki.

Screenshots

A few screenshots of pyslip_demo.py, the first showing OpenStreetMap tiles:

pyslip/examples/graphics/pyslip_demo_osm.png

Next, the pre-generated GMT tiles:

pyslip/examples/graphics/pyslip_demo_gmt.png

Getting pySlip

You can clone this repository, of course, and then do:

python setup.py install

Or you could install through PyPI:

pip install pyslip

Using pip is the recommended way to install pySlip as the cheese shop code is guaranteed to work. The code in the GitHib repository is, unfortunately, a moving target.

Map Tiles Licensing

OpenStreetMap Tiles

© OpenStreetMap contributors

See the licence here.

Stamen Toner Tiles

Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL.

Stamen Watercolor and Transport Tiles

Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.

Tile Usage

Before using any tiles provided by pySlip modules, make sure you are not transgressing any usage rules applied by the tiles provider.

Heavy usage of tiles probably means you should set up your own tile cache server and write a Tiles module that gets tiles from your own server(s).