Make a customized map with placemarks from a KML file.
The modules necessary to run this program are in requirements.txt. If you are only interested in the command line interface to make the custom maps, you will need only the python port of Modest Maps and Pillow, a fork of the Python Image Library.
The is the folder in which all scripts of the program will be put.
git clone https://github.com/galvanic/MapGift.git <path of folder to clone to>
cd <folder path cloned to>
pip install pillow
pip install modestmaps
./mapgift.pymapgift.py takes the following options:
-
-p map tile provider; choose from:
-
osm: OpenStreetMap
-
aerial: Microsoft Bing Aerial Maps
-
the beautiful map tiles made by Stamen Design (see Attribution below):
- watercolor: Stamen Watercolor
- toner: Stamen Toner
- lines: Stamen Toner Lines
- lite: Stamen Toner Lite
- labels: Stamen Toner Labels
- hybrid: Stamen Toner Hybrid
- background: Stamen Toner Background
-
Add your own by implementing a
Providerclass in theproviders.pyand adding it to thePROVIDERdictionary insidemapgift.py
-
-
-a area name or coordinates
-
-z zoom level (from 1 to 18 technically but here limited from 4 to 15)
-
-c whether to interpret area coordinates as centre or not
-
-k filepath of kmlfile to use, if at all
-
-o output filepath, without the extension
-
-v verbosity
-
-s shows the map with your system's default preview application
-
-i opens an interactive shell in the local environment
For example:
mapapp/mapgift.py -vsi -a london -p toner -z 12- preview of map tile style on mouseover of 'design' form options
- change javascript map provider
- refactor
mapgift.pymodule - implement a lot more control over placemarks, more fine tuning
- responsive design (esp for showing archive page on phone)
Some of the map designs provided by this program are © Stamen Design, under a Creative Commons Attribution (CC BY 3.0) license: Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.