forked from mapnik/mapnik
-
Notifications
You must be signed in to change notification settings - Fork 1
ExampleCode
adrianbj edited this page Apr 2, 2012
·
6 revisions
The Mapnik source comes with some example code in the mapnik/demo directory.
Here are some other sets of Example Code to learn from.
-
Name:
cali.cpp
- Description: A sample program, adapted from demo/c++/rundemo.cpp which demonstrates how one might use the Mapnik C++ API to render the state of California from USGS Shapefile data.
- Source: http://gist.github.com/5009
- Tested On: Mac OS 10.5
- Added by: lwu
-
Name:
world_map_and_styles.py
,world_map.py
- Description: A mirror of the GettingStarted tutorial along with sample data.
- Source:
- Pure Python example
- Python with XML Mapfile
- Sample Data for each example
- Tested On: Mac OS 10.5
- Added by: (original mapnik tutorial)
-
Name:
world_population.py
- Description: A mirror of the XmlGettingStarted tutorial along with sample data.
- Source: Python Script, XML Mapfile, and data
- Tested On: Mac OS 10.5
- Added by: springmeyer
Code samples for writing to SVG and PDF
The mapnik-utils project includes some example code as well: http://code.google.com/p/mapnik-utils/
An e-mail on Mapnik ShieldSymbolizer. Also describes use of
$ python
>>>import mapnik
>>>dir(mapnik)
>>>help(mapnik)
and
$ pydoc -p 8080
and then open a browser and go to : http://localhost:8080/mapnik.html