Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Geospatial Development Essentials

You're reading from   Python Geospatial Development Essentials Utilize Python with open source libraries to build a lightweight, portable, and customizable GIS desktop application

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781782175407
Length 192 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Karim Bahgat Karim Bahgat
Author Profile Icon Karim Bahgat
Karim Bahgat
Arrow right icon
View More author details
Toc

Interactively rendering our maps

Now that we have ways of combining several layers into a rendered map image, we get to the more exciting part of how to do this interactively in our application with immediate results.

Linking the MapView to the renderer

After we rendered a set of layers onto a map image, this image must be sent to and displayed in our application for immediate feedback. This task is done by the MapView widget we created in Chapter 3, Designing the Visual Look of Our Application. While building our application, the idea is that all we have to worry about is creating this visual MapView widget; behind the scenes, the MapView will be responsible for creating its own MapCanvas renderer to do the actual work. Since the MapCanvas class needs LayerGroup to manage its layers, we will create a MapView method to assign a LayerGroup, in app/toolkit/map.py:

    def assign_layergroup(self, layergroup):
        self.layers = layergroup

We then link the two together as additional code in...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image