Shumate.SimpleMap

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.SimpleMap Shumate.SimpleMap Gtk.Widget->Shumate.SimpleMap

Subclasses:

None

Methods

Inherited:

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

Structs:

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

class

new ()

add_overlay_layer (layer)

get_compass ()

get_license ()

get_map ()

get_map_source ()

get_scale ()

get_show_zoom_buttons ()

get_viewport ()

insert_overlay_layer (layer, idx)

remove_overlay_layer (layer)

set_map_source (map_source)

set_show_zoom_buttons (show_zoom_buttons)

Virtual Methods

Inherited:

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

Properties

Inherited:

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

Name

Type

Flags

Short Description

compass

Shumate.Compass

r

Compass

license

Shumate.License

r

License

map

Shumate.Map

r

Map

map-source

Shumate.MapSource

r/w/en

Map source

scale

Shumate.Scale

r

Scale

show-zoom-buttons

bool

r/w/en

Show zoom buttons

viewport

Shumate.Viewport

r

Viewport

Signals

Inherited:

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

Name

Short Description

symbol-clicked

Emitted when a symbol in the base map layer (not in overlay layers) is clicked.

Fields

Inherited:

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

Class Details

class Shumate.SimpleMap(**kwargs)
Bases:

Gtk.Widget

Abstract:

No

Structure:

Shumate.SimpleMapClass

A ready-to-use map [class`Gtk`.Widget].If you want to use your own implementation, you can look at the [class`Shumate`.Map] widget.

The simple map contains a zoom widget, a [class`Shumate`.License] at the bottom, a [class`Shumate`.Scale] and a [class`Shumate`.Compass].

classmethod new()
Return type:

Shumate.SimpleMap

add_overlay_layer(layer)
Parameters:

layer (Shumate.Layer) – a [class`Layer`] to add

Adds a map layer as an overlay on top of the base map.

get_compass()
Returns:

a [class`Compass`]

Return type:

Shumate.Compass

Gets the compass widget for the map.

get_license()
Returns:

a [class`License`]

Return type:

Shumate.License

Gets the license widget for the map.

get_map()
Returns:

a [class`Map`]

Return type:

Shumate.Map

Gets the [class`SimpleMap`]’s underlying [class`Map`].

get_map_source()
Returns:

a [class`MapSource`]

Return type:

Shumate.MapSource

Gets the map source for the current base layer.

get_scale()
Returns:

a [class`Scale`]

Return type:

Shumate.Scale

Gets the scale widget for the map.

get_show_zoom_buttons()
Returns:

True if the zoom buttons are visible, otherwise False

Return type:

bool

Gets whether or not the zoom buttons are shown.

get_viewport()
Returns:

a [class`Viewport`]

Return type:

Shumate.Viewport

Gets the map’s viewport, needed for constructing map layers that will be added to it.

insert_overlay_layer(layer, idx)
Parameters:
remove_overlay_layer(layer)
Parameters:

layer (Shumate.Layer) – a [class`Layer`] that was added to the map previously

Removes a layer from the map.

set_map_source(map_source)
Parameters:

map_source (Shumate.MapSource or None) – a [class`MapSource`]

Sets the source for the base map.

set_show_zoom_buttons(show_zoom_buttons)
Parameters:

show_zoom_buttons (bool) – True to show the zoom buttons, False to hide them

Sets whether or not the zoom buttons are shown.

Signal Details

Shumate.SimpleMap.signals.symbol_clicked(simple_map, event)
Signal Name:

symbol-clicked

Flags:

RUN_LAST

Parameters:

Emitted when a symbol in the base map layer (not in overlay layers) is clicked.

New in version 1.1.

Property Details

Shumate.SimpleMap.props.compass
Name:

compass

Type:

Shumate.Compass

Default Value:

None

Flags:

READABLE

Compass

Shumate.SimpleMap.props.license
Name:

license

Type:

Shumate.License

Default Value:

None

Flags:

READABLE

License

Shumate.SimpleMap.props.map
Name:

map

Type:

Shumate.Map

Default Value:

None

Flags:

READABLE

Map

Shumate.SimpleMap.props.map_source
Name:

map-source

Type:

Shumate.MapSource

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Map source

Shumate.SimpleMap.props.scale
Name:

scale

Type:

Shumate.Scale

Default Value:

None

Flags:

READABLE

Scale

Shumate.SimpleMap.props.show_zoom_buttons
Name:

show-zoom-buttons

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Show zoom buttons

Shumate.SimpleMap.props.viewport
Name:

viewport

Type:

Shumate.Viewport

Default Value:

None

Flags:

READABLE

Viewport