In this chapter, we designed and implemented a simple but complete turnkey mapping application using PyQGIS. In doing this, we learned how a wrapper script can be used to keep platform-specific settings out of your Python program. We also saw how we can define our application's UI in a separate module even if we don't use Qt Designer to create our user interface templates.
We learned how to use the "PAL" labeling engine built into QGIS to display a label for each feature within a vector map layer. We saw that a QgsRuleBasedRendererV2
object can be used to show or hide certain features based on the map's scale factor, and that data-defined properties allow us to calculate values such as the label's font size; we also saw how the CASE...WHEN
expression can be used to calculate data-defined properties in sophisticated ways.
Finally, we saw how to implement Google Maps style panning and zooming within a mapping application.
In the next chapter, we will learn about some of the more advanced...