Shumate.Layer

g GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Shumate.Layer Shumate.Layer Gtk.Widget->Shumate.Layer

Subclasses:

Shumate.MapLayer, Shumate.MarkerLayer, Shumate.PathLayer

Methods

Inherited:

Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

get_viewport ()

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)

do_get_debug_text ()

Properties

Inherited:

Gtk.Widget (34), Gtk.Accessible (1)

Name

Type

Flags

Short Description

viewport

Shumate.Viewport

r/w/co

The viewport used to display the layer

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1)

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.Widget

r

Class Details

class Shumate.Layer(**kwargs)
Bases:

Gtk.Widget

Abstract:

Yes

Structure:

Shumate.LayerClass

Every layer (overlay that moves together with the map) has to inherit this class and implement its virtual methods.

You can use the same layer to display many types of maps. In Shumate they are called map sources. You can change the [property`MapLayer`:py:data::map-source<Shumate.Layer.props.map_source>] property at any time to replace the current displayed map.

get_viewport()
Returns:

The Shumate.Viewport.

Return type:

Shumate.Viewport

Gets the Shumate.Viewport used by this layer.

do_get_debug_text() virtual
Returns:

a string with debug text

Return type:

str or None

Returns a string to show in the debug overlay, which can be enabled in the GTK inspector.

Property Details

Shumate.Layer.props.viewport
Name:

viewport

Type:

Shumate.Viewport

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The viewport used to display the layer