From 1ad83ec843cb36808310afb5fe9e5ea296d3f0fb Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Tue, 16 Dec 2008 17:41:40 -0500 Subject: Add marker on map --- libempathy-gtk/empathy-contact-widget.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libempathy-gtk/empathy-contact-widget.c') diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index faa6b1bea..90fb7ba9e 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -1239,6 +1239,8 @@ contact_widget_location_update (EmpathyContactWidget *information) GHashTable *location = empathy_contact_get_location (information->contact); GValue *value; gdouble lat, lon; + ClutterActor *marker; + ChamplainLayer *layer; value = g_hash_table_lookup (location, EMPATHY_LOCATION_LAT); if (value == NULL) @@ -1292,6 +1294,14 @@ contact_widget_location_update (EmpathyContactWidget *information) g_object_set (G_OBJECT (information->map_view), "show-license", FALSE, NULL); + layer = champlain_layer_new (); + champlain_view_add_layer (CHAMPLAIN_VIEW (information->map_view), layer); + + marker = champlain_marker_new_with_label ( + empathy_contact_get_name (information->contact), NULL, NULL, NULL); + champlain_marker_set_position (CHAMPLAIN_MARKER (marker), lat, lon); + clutter_container_add (CLUTTER_CONTAINER (layer), marker, NULL); + champlain_view_center_on (CHAMPLAIN_VIEW(information->map_view), lat, lon); gtk_widget_show_all (information->vbox_location); } -- cgit v1.2.3