Package viewer :: Package lib :: Module tileloader :: Class TileLoader
[hide private]
[frames] | no frames]

Class TileLoader

source code


This class uses asynchttp to download OSM-tiles in an asynchronous manner.


Author: P. Tute

Nested Classes [hide private]

Inherited from asynchttp.AsyncHTTPConnection: response_class

Instance Methods [hide private]
 
__init__(self, player, x, y, z, layer='mapnik')
player is an instance of the player that uses the tiles.
source code
 
get_tile(self)
Builds a response and tries to download the right tile from x, y, andd zoom-values.
source code
 
handle_connect(self)
Notification from asyncore that we are connected
source code
 
handle_response(self)
This is an abstract function, the user MUST overload it
source code

Inherited from asynchttp.AsyncHTTPConnection: close, collect_incoming_data, connect, endheaders, getresponse, handle_close, handle_error, handle_read, putheader, putrequest, request, send_entity, set_debuglevel

Inherited from asynchat.async_chat: close_when_done, discard_buffers, found_terminator, get_terminator, handle_write, initiate_send, push, push_with_producer, readable, set_terminator, writable

Inherited from asynchat.async_chat (private): _collect_incoming_data, _get_data

Inherited from asyncore.dispatcher: __getattr__, __repr__, __str__, accept, add_channel, bind, create_socket, del_channel, handle_accept, handle_connect_event, handle_expt, handle_expt_event, handle_read_event, handle_write_event, listen, log, log_info, recv, send, set_reuse_addr, set_socket

Class Variables [hide private]

Inherited from asynchttp.AsyncHTTPConnection: auto_open, debuglevel, default_port

Inherited from asynchat.async_chat: ac_in_buffer_size, ac_out_buffer_size

Inherited from asyncore.dispatcher: accepting, addr, closing, connected, debug, ignore_log_types

Method Details [hide private]

__init__(self, player, x, y, z, layer='mapnik')
(Constructor)

source code 

player is an instance of the player that uses the tiles. layer is one of 'tah', 'oam', and 'mapnik' (default).

Overrides: asyncore.dispatcher.__init__

handle_connect(self)

source code 

Notification from asyncore that we are connected

Overrides: asyncore.dispatcher.handle_connect

handle_response(self)

source code 

This is an abstract function, the user MUST overload it

Overrides: asynchttp.AsyncHTTPConnection.handle_response
(inherited documentation)