Now we will prepare an environment that is capable of using this data source. We are going to adapt the previous experiments into building blocks for the application and put them inside an application class, just as we did with the Geocaching app.
First let's organize the folder and files.
Create a new package called
map_maker
inside yourChapter5
folder. To do this, right-click on the folder and chose New | Python Package.Move the
my_datasource.py
file to themap_make
folder (drag and drop it).Copy the
map_style.xml
andmap_functions.py
files that are inside themapnik_experiments
folder to themap_maker
folder.Rename
map_style.xml
tostyles.xml
.In the
Chapter5
root, create a file namedmap_maker_app.py
. The complete tree structure should look like this:Chapter5 │ geocaching_app.py | map_maker_app.py │ models.py │ ├───mapnik_experiments │ ├───map_maker │ __init__.py │ my_datasource.py | styles.xml | map_functions.py │ ├───utils
Now we...