the redraw timer ensures we show new map tiles as they
        are downloaded

def on_redraw_timer(self, event):
        '''the redraw timer ensures we show new map tiles as they
        are downloaded'''
        state = self.state
        while state.in_queue.qsize():
            obj = state.in_queue.get()
            if isinstance(obj, MPImageData):
                img = wx.EmptyImage(obj.width, obj.height)
                img.SetData(obj.data)
                self.img = img
                self.need_redraw = True
                if state.auto_size:
                    client_area = state.frame.GetClientSize()
                    total_area = state.frame.GetSize()
                    bx = max(total_area.x - client_area.x,0)
                    by = max(total_area.y - client_area.y,0)
                    state.frame.SetSize(wx.Size(obj.width+bx, obj.height+by))
            if isinstance(obj, MPImageTitle):
                state.frame.SetTitle(obj.title)
            if isinstance(obj, MPImageMenu):
                self.set_menu(obj.menu)
            if isinstance(obj, MPImagePopupMenu):
                self.set_popup_menu(obj.menu)
            if isinstance(obj, MPImageBrightness):
                state.brightness = obj.brightness
                self.need_redraw = True
            if isinstance(obj, MPImageFullSize):
                self.full_size()
            if isinstance(obj, MPImageFitToWindow):
                self.fit_to_window()
        if self.need_redraw:
            self.redraw()