Module pymapd :: Class Mapper
[frames] | no frames]

Class Mapper


Nested Classes

Inherited from dbus.service.Interface: __metaclass__

Instance Methods
 
__init__(self, bus, daemon)
Constructor.
 
CalcOffset(self, newmap, rel_path)
calculate a pixel offset from old to new postion:
 
RequestMap(self, newmap, rel_path)
request map tiles
 
NewFile(self, *args, **keywords)
signals the arrival of a tile that was previosly marked as 'PENDING'
 
calc_offset(self, latitude, longitude, zoom, new_lat, new_lon, **newmap)
 
update_coordinates(self)
 
request_map(self, map_type, latitude, longitude, zoom, delta_x=False, delta_y=False, pos_x=False, pos_y=False, **newmap)
 
is_cached(self, map_type, tile_x, tile_y, zoom)
 
waiter(self)

Inherited from dbus.service.Object: Introspect, __repr__, __str__, add_to_connection, remove_from_connection

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables
  mappers = dict(OsmStreet= lambda tile_x, tile_y, zoom:('tile.o...

Inherited from dbus.service.FallbackObject: SUPPORTS_MULTIPLE_OBJECT_PATHS

Inherited from dbus.service.Object: SUPPORTS_MULTIPLE_CONNECTIONS

Properties

Inherited from dbus.service.Object: __dbus_object_path__, connection, locations

Inherited from object: __class__

Method Details

__init__(self, bus, daemon)
(Constructor)

 

Constructor.

Note that the superclass' bus_name __init__ argument is not supported here.

Parameters:
  • conn - The connection on which to export this object. If this is not None, an object_path must also be provided.

    If None, the object is not initially available on any Connection.

  • object_path - A D-Bus object path at which to make this Object available immediately. If this is not None, a conn must also be provided.

    This object will implements all object-paths in the subtree starting at this object-path, except where a more specific object has been added.

Overrides: object.__init__
(inherited documentation)

CalcOffset(self, newmap, rel_path)

 

calculate a pixel offset from old to new postion:

latitude, longitude zoom new_lat, new_lon
Decorators:
  • @method(DIN_MAP, 'a{sv}', 'a{sv}', rel_path_keyword= 'rel_path',)
Overrides: pyneo.interfaces.map.Map.CalcOffset
(inherited documentation)

RequestMap(self, newmap, rel_path)

 

request map tiles

map_type latitude longitude zoom delta_x=Empty delta_y=Empty pos_x=Empty pos_y=Empty
Decorators:
  • @method(DIN_MAP, 'a{sv}', 'a{sa{sv}}', rel_path_keyword= 'rel_path',)
Overrides: pyneo.interfaces.map.Map.RequestMap
(inherited documentation)

NewFile(self, *args, **keywords)

 
signals the arrival of a tile that was previosly marked as 'PENDING'
Decorators:
  • @notify(DIN_MAP, 'a{sa{sv}}')
Overrides: pyneo.interfaces.map.Map.NewFile
(inherited documentation)

Class Variable Details

mappers

Value:
dict(OsmStreet= lambda tile_x, tile_y, zoom:('tile.openstreetmap.org',\
 '/%d/%d/%d.png' %(zoom, tile_x, tile_y), {},), OsmThunderflames= lamb\
da tile_x, tile_y, zoom:('www.thunderflames.org', '/tiles/cycle/%d/%d/\
%d.png' %(zoom, tile_x, tile_y), {},), OsmCycle= lambda tile_x, tile_y\
, zoom:('andy.sandbox.cloudmade.com', '/tiles/cycle/%d/%d/%d.png' %(zo\
om, tile_x, tile_y), {},), OsmTilesathome= lambda tile_x, tile_y, zoom\
:('tah.openstreetmap.org', '/Tiles/tile/%d/%d/%d.png' %(zoom, tile_x, \
tile_y,), {},), GoogleMap= lambda tile_x, tile_y, zoom:('mt0.google.co\
...