| libchamplain Reference Manual | ||||
|---|---|---|---|---|
#include <champlain/champlainmarker.h>
ChamplainMarker;
ClutterActor* champlain_marker_new ();
ClutterActor* champlain_marker_new_with_label (const gchar *label,
const gchar *font,
ClutterColor *text_color,
ClutterColor *marker_color);
void champlain_marker_set_position (ChamplainMarker *marker,
gdouble longitude,
gdouble latitude);
Markers reprensent points of interest on a map. Markers need to be placed on a layer (a ClutterGroup). Layers have to be added to a ChamplainView for the markers to show on the map.
A marker is nothing more than a regular ClutterActor. You can draw on it what ever you want. Don't forget to set the anchor position in the marker using champlain_marker_set_anchor. Set the markers position on the map using champlain_marker_set_position.
Champlain has a default type of markers with text. To create one, use champlain_marker_new_with_label.
typedef struct {
ClutterGroup group;
ChamplainMarkerPrivate *priv;
} ChamplainMarker;
ClutterActor* champlain_marker_new ();
Returns : |
a new ChamplainMarker ready to be used as a ClutterActor. |
Since 0.2
ClutterActor* champlain_marker_new_with_label (const gchar *label, const gchar *font, ClutterColor *text_color, ClutterColor *marker_color);
|
the text of the label |
|
the font to use to draw the text, for example "Courrier Bold 11", can be NULL |
|
a ClutterColor, the color of the text, can be NULL |
|
a ClutterColor, the color of the marker, can be NULL |
Returns : |
a new ChamplainMarker with a drawn marker containing the given text. |
Since 0.2
void champlain_marker_set_position (ChamplainMarker *marker, gdouble longitude, gdouble latitude);
Positions the marker on the map at the coordinates
|
a ChamplainMarker |
|
the longitude to center the map at |
|
the longitude to center the map at |
Since 0.2