OsmGpsMap.MapLayer¶
- Implementations:
Methods¶
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class OsmGpsMap.MapLayer¶
- Bases:
- Structure:
- busy()¶
- Returns:
layer busy state
- Return type:
Check whether layer is busy (eg drawing an animation)
Added in version 0.6.0.
- button_press(map, event)¶
- Parameters:
map (
OsmGpsMap.Map) – aOsmGpsMap.Mapwidgetevent (
Gdk.EventButton) – aGdk.EventButtonevent
- Returns:
whether the event had been handled
- Return type:
Handle button event
Added in version 0.6.0.
- draw(map, cr)¶
- Parameters:
map (
OsmGpsMap.Map) – aOsmGpsMap.Mapwidgetcr (
cairo.Context) – a cairo context to draw to
During
Gtk.Widget::drawthe map passes its cairo context here. Draw in widget pixel coordinates. Convert geographic positions withOsmGpsMap.Map.convert_geographic_to_screen(). Do not create your own cairo surface; the map already has one. For GPS tracks and markers preferOsmGpsMap.Map.track_add() andOsmGpsMap.Map.image_add().Added in version 0.6.0.
- render(map)¶
- Parameters:
map (
OsmGpsMap.Map) – aOsmGpsMap.Mapwidget
Called when the offscreen map pixmap is rebuilt. Use this to update cached drawing (as
OsmGpsMap.MapOsddoes). Geographic overlays can leave this empty and paint inOsmGpsMap.MapLayer.draw() instead.Added in version 0.6.0.
- do_busy() virtual¶
- Returns:
layer busy state
- Return type:
Check whether layer is busy (eg drawing an animation)
Added in version 0.6.0.
- do_button_press(map, event) virtual¶
- Parameters:
map (
OsmGpsMap.Map) – aOsmGpsMap.Mapwidgetevent (
Gdk.EventButton) – aGdk.EventButtonevent
- Returns:
whether the event had been handled
- Return type:
Handle button event
Added in version 0.6.0.
- do_draw(map, cr) virtual¶
- Parameters:
map (
OsmGpsMap.Map) – aOsmGpsMap.Mapwidgetcr (
cairo.Context) – a cairo context to draw to
During
Gtk.Widget::drawthe map passes its cairo context here. Draw in widget pixel coordinates. Convert geographic positions withOsmGpsMap.Map.convert_geographic_to_screen(). Do not create your own cairo surface; the map already has one. For GPS tracks and markers preferOsmGpsMap.Map.track_add() andOsmGpsMap.Map.image_add().Added in version 0.6.0.
- do_render(map) virtual¶
- Parameters:
map (
OsmGpsMap.Map) – aOsmGpsMap.Mapwidget
Called when the offscreen map pixmap is rebuilt. Use this to update cached drawing (as
OsmGpsMap.MapOsddoes). Geographic overlays can leave this empty and paint inOsmGpsMap.MapLayer.draw() instead.Added in version 0.6.0.