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 (183), GObject.Object (37), Gtk.Accessible (17), Gtk.Buildable (1)

Structs:

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

class

new ()

add_overlay_layer (layer)

get_base_map_layer ()

get_compass ()

get_license ()

get_map ()

get_map_source ()

get_scale ()

get_show_zoom_buttons ()

get_viewport ()

insert_overlay_layer_above (layer, sibling)

insert_overlay_layer_behind (layer, sibling)

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 (35), Gtk.Accessible (1)

Name

Type

Flags

Short Description

base-map-layer

Shumate.MapLayer

r

Base map layer

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_base_map_layer()
Returns:

the base map layer

Return type:

Shumate.MapLayer

Gets the [class`MapLayer`] that displays the base map.

New in version 1.4.

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_above(layer, sibling)
Parameters:

Inserts a map layer as an overlay on top of the base map. The layer will appear above sibling, or at the bottom (but still above the base map) if sibling is None.

New in version 1.5.

insert_overlay_layer_behind(layer, sibling)
Parameters:

Inserts a map layer as an overlay on top of the base map. The layer will appear just below sibling, or above everything else if sibling is None.

New in version 1.5.

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.base_map_layer
Name:

base-map-layer

Type:

Shumate.MapLayer

Default Value:

None

Flags:

READABLE

The [class`MapLayer`] that displays the map source.

This is a read-only property. To change the basemap, set the [property`SimpleMap`:py:data::map-source<Shumate.SimpleMap.props.map_source>] property.

New in version 1.4.

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