:right-sidebar: True SimpleMap =================================================================== .. currentmodule:: gi.repository.Shumate .. class:: SimpleMap(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget` A ready-to-use map :obj:`~gi.repository.Gtk.Widget`\.If you want to use your own implementation, you can look at the :obj:`~gi.repository.Shumate.Map` widget. The simple map contains a zoom widget, a :obj:`~gi.repository.Shumate.License` at the bottom, a :obj:`~gi.repository.Shumate.Scale` and a :obj:`~gi.repository.Shumate.Compass`\. Constructors ------------ .. rst-class:: interim-class .. class:: SimpleMap :no-index: .. classmethod:: new() -> ~gi.repository.Shumate.SimpleMap Methods ------- .. rst-class:: interim-class .. class:: SimpleMap :no-index: .. method:: add_overlay_layer(layer: ~gi.repository.Shumate.Layer) -> None Adds a map layer as an overlay on top of the base map. :param layer: a :obj:`~gi.repository.Shumate.Layer` to add .. method:: get_compass() -> ~gi.repository.Shumate.Compass Gets the compass widget for the map. .. method:: get_license() -> ~gi.repository.Shumate.License Gets the license widget for the map. .. method:: get_map() -> ~gi.repository.Shumate.Map Gets the :obj:`~gi.repository.Shumate.SimpleMap`\'s underlying :obj:`~gi.repository.Shumate.Map`\. .. method:: get_map_source() -> ~gi.repository.Shumate.MapSource Gets the map source for the current base layer. .. method:: get_scale() -> ~gi.repository.Shumate.Scale Gets the scale widget for the map. .. method:: get_show_zoom_buttons() -> bool Gets whether or not the zoom buttons are shown. .. method:: get_viewport() -> ~gi.repository.Shumate.Viewport Gets the map's viewport, needed for constructing map layers that will be added to it. .. method:: insert_overlay_layer(layer: ~gi.repository.Shumate.Layer, idx: int) -> None :param layer: :param idx: .. method:: remove_overlay_layer(layer: ~gi.repository.Shumate.Layer) -> None Removes a layer from the map. :param layer: a :obj:`~gi.repository.Shumate.Layer` that was added to the map previously .. method:: set_map_source(map_source: ~gi.repository.Shumate.MapSource | None = None) -> None Sets the source for the base map. :param map_source: a :obj:`~gi.repository.Shumate.MapSource` .. method:: set_show_zoom_buttons(show_zoom_buttons: bool) -> None Sets whether or not the zoom buttons are shown. :param show_zoom_buttons: :const:`True` to show the zoom buttons, :const:`False` to hide them Properties ---------- .. rst-class:: interim-class .. class:: SimpleMap :no-index: .. attribute:: props.compass :type: ~gi.repository.Shumate.Compass The type of the None singleton. .. attribute:: props.license :type: ~gi.repository.Shumate.License The type of the None singleton. .. attribute:: props.map :type: ~gi.repository.Shumate.Map .. attribute:: props.map_source :type: ~gi.repository.Shumate.MapSource The type of the None singleton. .. attribute:: props.scale :type: ~gi.repository.Shumate.Scale The type of the None singleton. .. attribute:: props.show_zoom_buttons :type: bool The type of the None singleton. .. attribute:: props.viewport :type: ~gi.repository.Shumate.Viewport The type of the None singleton. Signals ------- .. rst-class:: interim-class .. class:: SimpleMap.signals :no-index: .. method:: symbol_clicked(event: ~gi.repository.Shumate.SymbolEvent) -> None The type of the None singleton. .. versionadded:: 1.1 :param event: a :obj:`~gi.repository.Shumate.SymbolEvent` with details about the clicked symbol.