SymbolEvent
Object Hierarchy:
Description:
[
CCode ( type_id =
"shumate_symbol_event_get_type ()" ) ]
[
Version ( since =
"1.1" ) ]
public sealed class SymbolEvent :
Object,
Location
An object containing the details of a map feature that has been clicked.
It is the argument of the [signal@MapLayer:ShumateSymbolEvent:symbol-clicked] and [signal@SimpleMap:
ShumateSymbolEvent:symbol-clicked] signals.
When vector maps are rendered, they may contain labels and icons. When one of these symbols is clicked, these signals are emitted to give
the application access to the original location and details of the map feature.
[class@SymbolEvent] implements [iface@Location] so you can get the latitude and longitude of the feature that was clicked.
Content:
Properties:
- public string feature_id { get; }
The ID of the feature that this event pertains to, as it was given in
the data source.
- public string layer { get; }
The ID of the style layer of the symbol that this event pertains to.
- public uint n_press { get; set; }
The number of clicks/presses triggering the symbol event.
- public string source_layer { get; }
The ID of the source layer of the symbol that this event pertains to.
Creation methods:
Methods:
- public unowned string get_feature_id ()
Gets the feature ID as specified in the data source.
- public (unowned string)[] get_keys ()
Gets a list of the keys of the source feature's tags.
- public unowned string get_layer ()
Gets the name of the layer the clicked symbol is in, as named in the
vector stylesheet.
- public int get_n_press ()
Gets the number of clicks/presses that initiated the event.
- public unowned string get_source_layer ()
Gets the name of the source layer the clicked feature is in, as named
in the vector tile schema.
- public unowned string get_tag (string tag_name)
Gets a tag from the source feature.
Inherited Members:
All known members inherited from class GLib.Object
All known members inherited from interface Shumate.Location