Quantcast
Channel: AsciiArmor
Viewing all articles
Browse latest Browse all 10

motionless: taking the pain out of Google Static Maps

$
0
0

I have found myself needing to generate several map visualizations lately. Creating complex URLs for Google Static Maps can be time consuming and error prone. To make this process more civilized, I’ve put together a simple python library. It supports markers, paths as well as simple centered maps. All the details can be found on github. In brief, install with pip:

pip install motionless

Simple map centered on the Eiffel Tour:


frommotionlessimportCenterMapcmap=CenterMap(lat=48.858278,lon=2.294489,maptype='satellite')printcmap.generate_url()

Slightly more complex example generated from a GPX file on my Garmin device illustrating how to plot paths and add markers. Code is in the examples directory


Viewing all articles
Browse latest Browse all 10

Trending Articles