diff --git a/addressbook/gui/widgets/Makefile.am b/addressbook/gui/widgets/Makefile.am
index 511876a..7cf9f8e 100644
--- a/addressbook/gui/widgets/Makefile.am
+++ b/addressbook/gui/widgets/Makefile.am
@@ -18,7 +18,9 @@ libeabwidgets_la_CPPFLAGS =				\
 	-I$(top_srcdir)/widgets/misc			\
 	-I$(top_builddir)/shell				\
 	$(GNOME_PLATFORM_CFLAGS)			\
-	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
+	$(EVOLUTION_ADDRESSBOOK_CFLAGS)	\
+	$(CHAMPLAIN_CFLAGS)				\
+	$(GEOCLUE_CFLAGS)
 
 eabincludedir = $(privincludedir)/addressbook/gui/widgets
 
@@ -61,6 +63,9 @@ libeabwidgets_la_SOURCES =			\
 	ea-addressbook-view.h		\
 	ea-addressbook.c			\
 	ea-addressbook.h
+	
+EXTRA_libeabwidgets_la_SOURCES = eab-contact-display-geo.c	
+	
 
 libeabwidgets_la_LIBADD =					\
 	$(top_builddir)/widgets/misc/libemiscwidgets.la		\
@@ -68,7 +73,9 @@ libeabwidgets_la_LIBADD =					\
 	$(top_builddir)/widgets/table/libetable.la		\
 	$(top_builddir)/widgets/menus/libmenus.la		\
 	$(top_builddir)/a11y/libevolution-a11y.la		\
-	$(GNOME_PLATFORM_LIBS)
+	$(GNOME_PLATFORM_LIBS)	\
+	$(CHAMPLAIN_LIBS)		\
+	$(GEOCLUE_LIBS)	
 
 dist-hook:
 	cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/addressbook/gui/widgets/eab-contact-display-geo.c b/addressbook/gui/widgets/eab-contact-display-geo.c
new file mode 100644
index 0000000..2911370
--- /dev/null
+++ b/addressbook/gui/widgets/eab-contact-display-geo.c
@@ -0,0 +1,206 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include <champlain/champlain.h>
+#include <champlain-gtk/champlain-gtk.h>
+
+#include <geoclue/geoclue-address.h>
+#include <geoclue/geoclue-position.h>
+#include <geoclue/geoclue-geocode.h>
+#include <clutter-gtk/clutter-gtk.h>
+#include <glib.h>
+
+typedef struct geoclue_callback_data_ {
+	EContact *contact;
+	GtkHTMLEmbedded *gtkhtml_embedded;
+} GeoclueCallbackData;
+
+typedef struct geoclue_valid_embedded_containers_ {
+	GtkHTMLEmbedded *home;
+	GtkHTMLEmbedded *work;
+} GeoclueValidEmbeddedContainers;
+
+static GeoclueValidEmbeddedContainers valid_containers;
+
+
+/**
+ * Champlain bug #638652 workaround: forces full redraw on every "paint" signal
+ * from Clutter, because in Gtk3 the tiles are not redrawn until some event happens
+ * and we really don't want to wait for it.
+ */
+static void
+force_map_redraw (ClutterActor *actor)
+{
+	clutter_actor_queue_redraw(actor);
+}
+
+/**
+ * Clutter event handling workaround. Clutter-gtk propagates events down to parent widgets.
+ * In this case it leads to GtkHTML scrolling up and down while user's trying to zoom in the
+ * champlain widget. This workaround stops the propagation from map widget down to GtkHTML
+ */
+static gboolean
+handle_map_scroll_event (GtkWidget *widget, GdkEvent *event)
+{
+	return TRUE;
+}
+
+static void
+create_champlain_widget (GeoclueGeocode *geocode, GeocluePositionFields fields,
+			double latitude, double longitude, double altitude,
+			GeoclueAccuracy *accuracy, GError *error, GeoclueCallbackData *data)
+
+{
+	GtkWidget *map_widget;
+	ChamplainView  *view;
+	ChamplainMarkerLayer *marker_layer;
+	ClutterActor *marker, *scale_layer;
+	ClutterBinLayout *layout_manager;
+	gchar *contact_name;
+
+	/* Check if the container is still valid. User could have switched previewes
+	 * before this callback was called.
+	 */
+	if (((data->gtkhtml_embedded != valid_containers.home) &&
+	     (data->gtkhtml_embedded != valid_containers.work)) ||
+	    (! GTK_IS_CONTAINER (data->gtkhtml_embedded))) {
+		return;
+	}
+
+	/* Don't display any map when geoclue fails to obtain coordinates */
+	if (error ||
+			((fields & GEOCLUE_POSITION_FIELDS_LATITUDE) == 0 &&
+		    (fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) == 0)) {
+		g_warning ("Error while geocoding: %s\n", error == NULL ? "no coordinates" : error->message);
+		if (error)
+			g_error_free (error);
+
+		return;
+	}
+
+	/* Create champlain view */
+	map_widget = gtk_champlain_embed_new ();
+	gtk_container_add (GTK_CONTAINER (data->gtkhtml_embedded), map_widget);
+	gtk_widget_show_all (GTK_WIDGET (map_widget));
+	gtk_widget_set_size_request (map_widget, 250, 250);
+
+	view = gtk_champlain_embed_get_view (GTK_CHAMPLAIN_EMBED (map_widget));
+	clutter_actor_set_reactive (CLUTTER_ACTOR (view), TRUE);
+	champlain_view_set_zoom_level (CHAMPLAIN_VIEW (view), 10);
+	champlain_view_center_on (CHAMPLAIN_VIEW (view), latitude, longitude);
+	/* For better user experience, don't allow to zoom out below level 1, because
+	   then the map is smaller then the widget and it does not look nice */
+	champlain_view_set_min_zoom_level (CHAMPLAIN_VIEW (view), 1);
+	/* This feature seems to be broken and champlain is zooming on single click
+	   so the map is zoomed when you start dragging it, therefor it's disabled 
+	   for now */
+	champlain_view_set_zoom_on_double_click (CHAMPLAIN_VIEW (view), FALSE);
+
+	/* Add scale */
+	scale_layer = champlain_scale_new ();
+	champlain_scale_connect_view (CHAMPLAIN_SCALE (scale_layer), view);
+	layout_manager = champlain_view_get_layout_manager (view);
+	clutter_bin_layout_add (layout_manager, scale_layer,
+			CLUTTER_BIN_ALIGNMENT_START,
+	        CLUTTER_BIN_ALIGNMENT_END);
+
+	/* Add marker */
+	marker_layer = champlain_marker_layer_new_full (CHAMPLAIN_SELECTION_SINGLE);
+	champlain_view_add_layer (CHAMPLAIN_VIEW (view), CHAMPLAIN_LAYER (marker_layer));
+
+	contact_name = e_contact_get (data->contact, E_CONTACT_FULL_NAME);
+	marker = champlain_label_new_with_text (contact_name, "Serif 8", NULL, NULL);
+	g_free (contact_name);
+	champlain_label_set_use_markup (CHAMPLAIN_LABEL (marker), TRUE);
+	champlain_location_set_position (CHAMPLAIN_LOCATION (marker), latitude, longitude);
+	champlain_marker_layer_add_marker (marker_layer, CHAMPLAIN_MARKER (marker));
+
+	/* Workaround for Clutter events handling */
+	g_signal_connect (
+		map_widget, "scroll-event",
+		G_CALLBACK (handle_map_scroll_event), NULL);
+
+	/* Workaround for champlain bug #638652 */
+	g_signal_connect (
+		view, "paint",
+		G_CALLBACK (force_map_redraw), NULL);
+}
+
+static GeoclueGeocode*
+get_geocoder (void)
+{
+	GeoclueGeocode *geocoder = NULL;
+
+	/* Create new GeoclueGeocode */
+	geocoder = geoclue_geocode_new ("org.freedesktop.Geoclue.Providers.Yahoo",
+			"/org/freedesktop/Geoclue/Providers/Yahoo");
+
+	return geocoder;
+}
+
+static GHashTable*
+get_geoclue_from_address (const EContactAddress* addr)
+{
+	GHashTable *details;
+
+	if (addr) {
+		details = geoclue_address_details_new ();
+		g_hash_table_insert (details, g_strdup (GEOCLUE_ADDRESS_KEY_POSTALCODE), g_strdup ((*addr).code));
+		g_hash_table_insert (details, g_strdup (GEOCLUE_ADDRESS_KEY_COUNTRY), g_strdup ((*addr).country));
+		g_hash_table_insert (details, g_strdup (GEOCLUE_ADDRESS_KEY_LOCALITY), g_strdup ((*addr).locality));
+		g_hash_table_insert (details, g_strdup (GEOCLUE_ADDRESS_KEY_STREET), g_strdup ((*addr).street));
+
+		return details;
+	}
+
+	return NULL;
+}
+
+static void
+cm_create_map (EContact *contact, int map_type, GtkHTMLEmbedded *eb)
+{
+	GeoclueGeocode *geocoder;
+
+	geocoder = NULL;
+	geocoder = get_geocoder ();
+
+	if (geocoder != NULL) {
+		EContactAddress *addr;
+		GHashTable *details;
+		GeoclueCallbackData *callback_data;
+
+		callback_data = (GeoclueCallbackData*) g_malloc (sizeof (GeoclueCallbackData));
+		callback_data->contact = contact;
+		callback_data->gtkhtml_embedded = eb;
+
+		/* Get the lat & lng asynchronously. Map will be created in the callback */
+		addr = e_contact_get (contact, map_type);
+
+		details = get_geoclue_from_address (addr);
+		if (details) {
+			if (map_type == E_CONTACT_ADDRESS_HOME)
+				valid_containers.home = eb;
+			else
+				valid_containers.work = eb;
+
+			geoclue_geocode_address_to_position_async (geocoder, details,
+					(GeoclueGeocodeCallback) create_champlain_widget,
+					callback_data);
+
+			g_hash_table_destroy (details);
+		}
+	}
+}
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 0012f8a..aaf611f 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -26,6 +26,10 @@
 
 #include "eab-contact-display.h"
 
+#ifdef WITH_CONTACT_MAPS
+#include "eab-contact-display-geo.c"
+#endif
+
 #include "eab-gui-util.h"
 #include "e-util/e-util.h"
 #include "e-util/e-html-utils.h"
@@ -36,6 +40,7 @@
 #include <glib/gi18n.h>
 #include <gtkhtml/gtkhtml.h>
 #include <gtkhtml/gtkhtml-stream.h>
+#include <gtkhtml/gtkhtml-embedded.h>
 
 #define EAB_CONTACT_DISPLAY_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -607,6 +612,18 @@ render_note_block (GString *buffer, EContact *contact)
 }
 
 static void
+render_address_map (GString *buffer, EContact *contact, int map_type)
+{
+#ifdef WITH_CONTACT_MAPS
+	if (map_type == E_CONTACT_ADDRESS_WORK) {
+		g_string_append (buffer, "<object classid=\"address-map-work\"></object>");
+ 	 } else {
+ 		g_string_append (buffer, "<object classid=\"address-map-home\"></object>");
+ 	 }
+#endif
+}
+
+static void
 render_contact_horizontal (GString *buffer, EContact *contact)
 {
 	g_string_append (buffer, "<table border=\"0\">");
@@ -616,7 +633,13 @@ render_contact_horizontal (GString *buffer, EContact *contact)
 	g_string_append (buffer, "<table border=\"0\">");
 	render_contact_block (buffer, contact);
 	render_work_block (buffer, contact);
+	g_string_append (buffer, "<tr><td></td><td colspan=\"2\">");
+	render_address_map (buffer, contact, E_CONTACT_ADDRESS_WORK);
+	g_string_append (buffer, "<br></td></tr>");
 	render_personal_block (buffer, contact);
+	g_string_append (buffer, "<tr><td></td><td colspan=\"2\">");
+	render_address_map (buffer, contact, E_CONTACT_ADDRESS_HOME);
+	g_string_append (buffer, "<br></td></tr>");
 	g_string_append (buffer, "</table>");
 
 	g_string_append (buffer, "<table border=\"0\">");
@@ -645,12 +668,14 @@ render_contact_vertical (GString *buffer, EContact *contact)
 	g_string_append (buffer, "<td width=\"30\"></td><td valign=\"top\"><table border=\"0\">");
 	render_work_block (buffer, contact);
 	g_string_append (buffer, "</table>");
+	render_address_map (buffer, contact, E_CONTACT_ADDRESS_WORK);
 	g_string_append (buffer, "</td>");
 
 	/* Third column: Personal */
 	g_string_append (buffer, "<td width=\"30\"></td><td valign=\"top\"><table border=\"0\">");
 	render_personal_block (buffer, contact);
 	g_string_append (buffer, "</table>");
+	render_address_map (buffer, contact, E_CONTACT_ADDRESS_HOME);
 	g_string_append (buffer, "</td>");
 
 	/* Third row: note */
@@ -938,6 +963,7 @@ contact_display_get_property (GObject *object,
 				value, eab_contact_display_get_mode (
 				EAB_CONTACT_DISPLAY (object)));
 			return;
+
 		case PROP_ORIENTATION:
 			g_value_set_int (
 				value, eab_contact_display_get_orientation (
@@ -1206,6 +1232,11 @@ eab_contact_display_init (EABContactDisplay *display)
 	web_view = E_WEB_VIEW (display);
 	ui_manager = e_web_view_get_ui_manager (web_view);
 
+#ifdef WITH_CONTACT_MAPS
+	g_signal_connect (web_view, "object-requested",
+                      G_CALLBACK (eab_contact_display_object_requested), display);
+#endif
+
 	action_group = gtk_action_group_new ("internal-mailto");
 	gtk_action_group_set_translation_domain (action_group, domain);
 	gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
@@ -1356,3 +1387,17 @@ eab_contact_display_set_orientation (EABContactDisplay *display, GtkOrientation
 
 	g_object_notify (G_OBJECT (display), "orientation");
 }
+
+#ifdef WITH_CONTACT_MAPS
+void
+eab_contact_display_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, EABContactDisplay *display)
+{
+    EContact *contact = display->priv->contact;
+
+	if (g_ascii_strcasecmp (eb->classid, "address-map-work") == 0) {
+               cm_create_map (contact, E_CONTACT_ADDRESS_WORK, eb);
+	} else {
+               cm_create_map (contact, E_CONTACT_ADDRESS_HOME, eb);
+	}
+}
+#endif
diff --git a/addressbook/gui/widgets/eab-contact-display.h b/addressbook/gui/widgets/eab-contact-display.h
index 4c8c8ef..0492fce 100644
--- a/addressbook/gui/widgets/eab-contact-display.h
+++ b/addressbook/gui/widgets/eab-contact-display.h
@@ -91,6 +91,8 @@ void		eab_contact_display_set_mode	(EABContactDisplay *display,
 GtkOrientation eab_contact_display_get_orientation (EABContactDisplay *display);
 void eab_contact_display_set_orientation (EABContactDisplay *display, GtkOrientation orientation);
 
+void eab_contact_display_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, EABContactDisplay *display);
+
 G_END_DECLS
 
 #endif /* EAB_CONTACT_DISPLAY_H */
diff --git a/configure.ac b/configure.ac
index 8a7b907..62c2234 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,7 @@ m4_define([libnotify_minimum_version], [0.5.1])
 m4_define([unique_minimum_version], [2.90.4])
 
 dnl Optional Packages
-m4_define([champlain_minimum_version], [0.8])
+m4_define([champlain_minimum_version], [0.9])
 m4_define([clutter_gtk_minimum_version], [0.90])
 m4_define([geoclue_minimum_version], [0.11.1])
 m4_define([gladeui_minimum_version], [3.0.0])
@@ -1416,7 +1416,7 @@ dist_plugins_standard="$plugins_standard audio-inline image-inline pst-import"
 plugins_experimental_always="external-editor"
 
 plugins_experimental="$plugins_experimental_always $TNEF_ATTACHMENTS"
-dist_plugins_experimental="$plugins_experimental_always profiler tnef-attachments contacts-map"
+dist_plugins_experimental="$plugins_experimental_always profiler tnef-attachments"
 
 dnl ******************************
 dnl Profiling support
@@ -1479,42 +1479,42 @@ if test "x$enable_weather" = "xyes"; then
 	fi
 fi
 
-dnl ******************************************************
-dnl contacts-map plugin requires champlain-gtk and geoclue
-dnl N.B. The plugin is experimental so only require these
-dnl      packages if we are building experimental plugins.
-dnl ******************************************************
-if test "x$enable_plugins" = "xexperimental"; then
-	AC_ARG_ENABLE([contacts-map],
-		[AS_HELP_STRING([--enable-contacts-map],
-		[Enable contacts-map plugin @<:@default=yes@:>@])],
-		[enable_contacts_map="$enableval"], [enable_contacts_map=yes])
-
-	if test "x$enable_contacts_map" = "xyes"; then
-		PKG_CHECK_MODULES([CHAMPLAIN], [champlain-gtk-0.8 >= champlain_minimum_version], [have_champlain=yes], [have_champlain=no])
-		AC_SUBST(CHAMPLAIN_CFLAGS)
-		AC_SUBST(CHAMPLAIN_LIBS)
-
-		if test "x$have_champlain" = "xno"; then
-			AC_MSG_ERROR([champlain-gtk-0.8 >= champlain_minimum_version is required for the contacts-map plugin.  Use --disable-contacts-map to exclude the plugin.])
-		fi
+dnl ********************************************************************
+dnl maps in contacts preview requires champlain-gtk, geoclue and clutter
+dnl ********************************************************************
+AC_ARG_ENABLE([contact-maps],
+	[AS_HELP_STRING([--enable-contact-maps],
+	[Enable contact maps @<:@default=no@:>@])],
+	[enable_contact_maps="$enableval"], [enable_contact_maps="no"])
+
+if test "x$enable_contact_maps" = "xyes"; then
+	if test "x$with_clutter" = "xno"; then
+		AC_MSG_ERROR([Clutter is required for maps in contacts. Use --with-clutter=yes to enable clutter.])
+	fi
 
-		PKG_CHECK_MODULES([GEOCLUE], [geoclue >= geoclue_minimum_version], [have_geoclue=yes], [have_geoclue=no])
-		AC_SUBST(GEOCLUE_CFLAGS)
-		AC_SUBST(GEOCLUE_LIBS)
+	PKG_CHECK_MODULES([CHAMPLAIN], [champlain-gtk-0.10 >= champlain_minimum_version], [have_champlain=yes], [have_champlain=no])
+	AC_SUBST(CHAMPLAIN_CFLAGS)
+	AC_SUBST(CHAMPLAIN_LIBS)
 
-		if test "x$have_geoclue" = "xno"; then
-			AC_MSG_ERROR([geoclue is required for the contacts-map plugin.  Use --disable-contacts-map to exclude the plugin.])
-		fi
+	if test "x$have_champlain" = "xno"; then
+		AC_MSG_ERROR([champlain-gtk-0.9 >= champlain_minimum_version is required for maps in contacts preview.])
+	fi
 
-		PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0 >= clutter_gtk_minimum_version], [have_clutter_gtk="yes"], [have_clutter_gtk="no"] )
+	PKG_CHECK_MODULES([GEOCLUE], [geoclue >= geoclue_minimum_version], [have_geoclue=yes], [have_geoclue=no])
+	AC_SUBST(GEOCLUE_CFLAGS)
+	AC_SUBST(GEOCLUE_LIBS)
 
-		if test "x$have_clutter_gtk" = "xno"; then
-			AC_MSG_ERROR([clutter-gtk-1.0 is required for the contacts-map plugin.  Use --disable-contacts-map to exclude the plugin.])
-		fi
+	if test "x$have_geoclue" = "xno"; then
+		AC_MSG_ERROR([geoclue is required for maps in contacts preview.])
+	fi
 
-		plugins_standard="$plugins_standard contacts-map"
+	PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0 >= clutter_gtk_minimum_version], [have_clutter_gtk="yes"], [have_clutter_gtk="no"] )
+
+	if test "x$have_clutter_gtk" = "xno"; then
+		AC_MSG_ERROR([clutter-gtk-1.0 is required for maps in contacts preview.])
 	fi
+
+	AC_DEFINE(WITH_CONTACT_MAPS, 1, [When defined contacts preview will contain maps])
 fi
 
 dnl *****************************************
@@ -1786,7 +1786,6 @@ plugins/templates/Makefile
 plugins/tnef-attachments/Makefile
 plugins/vcard-inline/Makefile
 plugins/webdav-account-setup/Makefile
-plugins/contacts-map/Makefile
 smclient/Makefile
 smime/Makefile
 smime/lib/Makefile
diff --git a/plugins/contacts-map/Makefile.am b/plugins/contacts-map/Makefile.am
deleted file mode 100644
index 2c8a86d..0000000
--- a/plugins/contacts-map/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-@EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-contacts-map.eplug
-plugin_LTLIBRARIES = liborg-gnome-contacts-map.la
-
-liborg_gnome_contacts_map_la_CPPFLAGS =			\
-	$(AM_CPPFLAGS)					\
-	-I$(top_srcdir)					\
-	-I$(top_srcdir)/widgets				\
-	$(GNOME_PLATFORM_CFLAGS)			\
-	$(EVOLUTION_ADDRESSBOOK_CFLAGS)			\
-	$(CHAMPLAIN_CFLAGS)				\
-	$(GEOCLUE_CFLAGS)
-
-liborg_gnome_contacts_map_la_SOURCES = \
-		contacts-map.c \
-		geo-utils.c \
-		geo-utils.h
-
-liborg_gnome_contacts_map_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-liborg_gnome_contacts_map_la_LIBADD =	\
-	$(top_builddir)/e-util/libeutil.la	\
-	$(top_builddir)/shell/libeshell.la	\
-	$(CHAMPLAIN_LIBS)		\
-	$(GEOCLUE_LIBS)			\
-	$(EVOLUTION_ADDRESSBOOK_LIBS)	\
-	$(GNOME_PLATFORM_LIBS)
-
-EXTRA_DIST = org-gnome-contacts-map.eplug.xml
-
-BUILT_SOURCES = $(plugin_DATA)
-CLEANFILES = $(BUILT_SOURCES)
-
--include $(top_srcdir)/git.mk
diff --git a/plugins/contacts-map/contacts-map.c b/plugins/contacts-map/contacts-map.c
deleted file mode 100644
index 24297e0..0000000
--- a/plugins/contacts-map/contacts-map.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- *		Cedric Bosdonnat <cedric.bosdonnat@free.fr>
- *
- * Copyright (C) 2009 Cedric Bosdonnat (http://cedric.bosdonnat.free.fr)
- *
- */
-#include "geo-utils.h"
-
-#include <glib/gi18n.h>
-
-#include <libedataserver/e-source.h>
-#include <libedataserverui/e-source-selector.h>
-
-#include <shell/e-shell-sidebar.h>
-#include <shell/e-shell-view.h>
-#include <shell/e-shell-window.h>
-
-/* Plugin entry points */
-
-gboolean addressbook_map_init (GtkUIManager *ui_manager, EShellView *shell_view);
-void action_show_ebook_map (GtkAction *action, EShellView *shell_view);
-void show_map_general (ESourceSelector *selector);
-
-/* Implementations */
-
-gboolean
-addressbook_map_init (GtkUIManager *ui_manager, EShellView *shell_view)
-{
-	EShellWindow *shell_window;
-	GtkActionGroup *action_group;
-	GtkAction *action;
-	GIcon *icon;
-	const gchar *tooltip;
-	const gchar *name;
-	const gchar *label;
-
-	shell_window = e_shell_view_get_shell_window (shell_view);
-
-	name = "contacts-map";
-	label = _("Contacts map");
-	tooltip = _("Show a map of all the contacts");
-	action = gtk_action_new (name, NULL, tooltip, NULL);
-	icon = g_themed_icon_new ("gnome-globe");
-	gtk_action_set_gicon (action, icon);
-	gtk_action_set_label (action, label);
-
-	name = "contacts";
-	action_group = e_shell_window_get_action_group (shell_window, name);
-	gtk_action_group_add_action (action_group, action);
-
-	g_signal_connect (
-			action, "activate",
-			G_CALLBACK (action_show_ebook_map), shell_view);
-
-	g_object_unref (action);
-
-	return TRUE;
-}
-
-void
-action_show_ebook_map (GtkAction *action, EShellView *shell_view)
-{
-	EShellSidebar *shell_sidebar;
-	ESourceSelector *selector = NULL;
-
-	shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
-	g_object_get (shell_sidebar, "selector", &selector, NULL);
-	g_return_if_fail (selector != NULL);
-
-	show_map_general (selector);
-
-	g_object_unref (selector);
-}
-
-void
-show_map_general (ESourceSelector *selector)
-{
-	EBook *book;
-	ESource *primary_source;
-	EBookQuery *query;
-	GList *contacts, *tmp;
-	gchar *uri;
-
-	GeoclueGeocode *geocoder;
-	GeocluePositionFields fields;
-	GeoclueAccuracy *accuracy;
-
-	gdouble lat = 0;
-	gdouble lng = 0;
-
-	GtkWidget *map_widget;
-	ChamplainView  *view;
-	ChamplainLayer *layer;
-
-	gdouble *min_lat = NULL;
-	gdouble *max_lat = NULL;
-	gdouble *min_lng = NULL;
-	gdouble *max_lng = NULL;
-
-	primary_source = (ESource*)e_source_selector_get_primary_selection (selector);
-	uri = e_source_get_uri (primary_source);
-	book = e_book_new_from_uri (uri, NULL);
-
-	if (!book || !e_book_open (book, TRUE, NULL))
-	{
-		g_warning ("Couldn't load addressbook %s", uri);
-		return;
-	}
-
-	/* Get all the contacts with an address */
-	query = e_book_query_field_exists (E_CONTACT_ADDRESS);
-	e_book_get_contacts (book, query, &contacts, NULL);
-	e_book_query_unref (query);
-
-	init_map (&view, &map_widget);
-	layer = champlain_selection_layer_new ();
-
-	geocoder = NULL;
-	geocoder = get_geocoder ();
-	if (geocoder != NULL) {
-		for (tmp = contacts; tmp; tmp = tmp->next) {
-			GError *error = NULL;
-			EContact *contact;
-			EContactAddress *addr;
-			GHashTable *details;
-			gint i;
-			const gint addr_fields[] = {
-				E_CONTACT_ADDRESS_HOME,
-				E_CONTACT_ADDRESS_WORK,
-				E_CONTACT_ADDRESS_OTHER
-			};
-
-			contact = tmp->data;
-
-			/* Get the lat & lng and add the marker asynchronously */
-			i = 0;
-			addr = NULL;
-			while (!addr && i<G_N_ELEMENTS (addr_fields)) {
-				addr = e_contact_get (contact, addr_fields[i]);
-				i++;
-			}
-
-			details = (GHashTable*) get_geoclue_from_address (addr);
-			fields = geoclue_geocode_address_to_position (geocoder, details,
-					&lat, &lng, NULL, &accuracy, &error);
-
-			if (!error &&
-			    (fields & GEOCLUE_POSITION_FIELDS_LATITUDE) != 0 &&
-			    (fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) != 0) {
-				/* Add the marker to the map */
-				add_marker (layer, lat, lng, contact);
-				if (!min_lat) {
-					min_lat = g_malloc (sizeof (gdouble));
-					*min_lat = lat;
-				}
-				if (!max_lat) {
-					max_lat = g_malloc (sizeof (gdouble));
-					*max_lat = lat;
-				}
-				if (!min_lng) {
-					min_lng = g_malloc (sizeof (gdouble));
-					*min_lng = lng;
-				}
-				if (!max_lng) {
-					max_lng = malloc (sizeof (gdouble));
-					*max_lng = lng;
-				}
-
-				/* Store the min/max lat/lng */
-				get_min_max (min_lat, max_lat,
-						min_lng, max_lng, lat, lng);
-			} else if (error) {
-				g_warning ("Error while geocoding: %s\n", error->message);
-				g_error_free (error);
-			}
-
-			g_hash_table_destroy (details);
-			g_object_unref (contact);
-		}
-	}
-
-	champlain_view_add_layer (view, layer);
-	champlain_layer_show (layer);
-	champlain_layer_show_all_markers (CHAMPLAIN_LAYER (layer));
-
-	create_map_window (map_widget, _("Contacts map"));
-
-	/* Do not ensure something visible is we have nothing */
-	if (min_lat && min_lng && max_lat && max_lng)
-		champlain_view_ensure_visible (view,
-				*min_lat, *min_lng,
-				*max_lat, *max_lng, FALSE);
-
-	g_free (min_lat);
-	g_free (max_lat);
-	g_free (min_lng);
-	g_free (max_lng);
-
-	g_object_unref (geocoder);
-
-	if (contacts != NULL)
-		g_list_free (contacts);
-
-	g_object_unref (book);
-	g_free (uri);
-}
diff --git a/plugins/contacts-map/geo-utils.c b/plugins/contacts-map/geo-utils.c
deleted file mode 100644
index ec36b33..0000000
--- a/plugins/contacts-map/geo-utils.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- *		Cedric Bosdonnat <cedric.bosdonnat@free.fr>
- *
- * Copyright (C) 2009 Cedric Bosdonnat (http://cedric.bosdonnat.free.fr)
- *
- */
-
-#include "geo-utils.h"
-
-static gboolean is_clutter_initialized = FALSE;
-
-void
-get_min_max (gdouble *min_lat, gdouble *max_lat,
-	     gdouble *min_lng, gdouble *max_lng,
-	     gdouble lat, gdouble lng)
-{
-	if (lat < *min_lat)
-		*min_lat = lat;
-	else if (lat > *max_lat)
-		*max_lat = lat;
-
-	if (lng < *min_lng)
-		*min_lng = lng;
-	else if (lng > *max_lng)
-		*max_lng = lng;
-}
-
-void
-add_marker (ChamplainLayer *layer, gdouble lat, gdouble lng, EContact *contact)
-{
-	ClutterActor *marker;
-
-	gchar *contact_name = e_contact_get (contact, E_CONTACT_FULL_NAME);
-	marker = champlain_marker_new_with_text (contact_name, "Serif 8", NULL, NULL);
-	g_free (contact_name);
-
-	champlain_marker_set_use_markup (CHAMPLAIN_MARKER (marker), FALSE);
-	champlain_base_marker_set_position (CHAMPLAIN_BASE_MARKER (marker), lat, lng);
-
-	champlain_layer_add_marker (layer, CHAMPLAIN_BASE_MARKER (marker));
-}
-
-GeoclueGeocode*
-get_geocoder (void)
-{
-	GeoclueGeocode *geocoder = NULL;
-
-	/* Create new GeoclueGeocode */
-	geocoder = geoclue_geocode_new ("org.freedesktop.Geoclue.Providers.Yahoo",
-			"/org/freedesktop/Geoclue/Providers/Yahoo");
-
-	return geocoder;
-}
-
-GHashTable *
-get_geoclue_from_address (const EContactAddress* addr)
-{
-	GHashTable *address = geoclue_address_details_new ();
-
-	g_hash_table_insert (address, g_strdup (GEOCLUE_ADDRESS_KEY_POSTALCODE), g_strdup ((*addr).code));
-	g_hash_table_insert (address, g_strdup (GEOCLUE_ADDRESS_KEY_COUNTRY), g_strdup ((*addr).country));
-	g_hash_table_insert (address, g_strdup (GEOCLUE_ADDRESS_KEY_LOCALITY), g_strdup ((*addr).locality));
-	g_hash_table_insert (address, g_strdup (GEOCLUE_ADDRESS_KEY_STREET), g_strdup ((*addr).street));
-
-	return address;
-}
-
-void
-init_map (ChamplainView **view, GtkWidget **widget)
-{
-	if (!is_clutter_initialized) {
-		gtk_clutter_init (NULL, NULL);
-		is_clutter_initialized = TRUE;
-	}
-
-	*widget = gtk_champlain_embed_new ();
-	*view = gtk_champlain_embed_get_view (GTK_CHAMPLAIN_EMBED (*widget));
-
-	champlain_view_set_show_license (*view, FALSE);
-
-	g_object_set (G_OBJECT (*view), "scroll-mode", CHAMPLAIN_SCROLL_MODE_KINETIC,
-			"zoom-level", 9, NULL);
-}
-
-void
-create_map_window (GtkWidget *map_widget, const gchar *title)
-{
-	GtkWidget *window, *viewport;
-
-	/* create the main, top level, window */
-	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
-	/* give the window a 10px wide border */
-	gtk_container_set_border_width (GTK_CONTAINER (window), 10);
-
-	/* give it the title */
-	gtk_window_set_title (GTK_WINDOW (window), title );
-
-	gtk_widget_set_size_request (map_widget, 300, 300);
-
-	viewport = gtk_frame_new (NULL);
-	gtk_container_add (GTK_CONTAINER (viewport), map_widget);
-
-	/* and insert it into the main window  */
-	gtk_container_add (GTK_CONTAINER (window), viewport);
-
-	/* make sure that everything, window and label, are visible */
-	gtk_widget_show_all (window);
-}
diff --git a/plugins/contacts-map/geo-utils.h b/plugins/contacts-map/geo-utils.h
deleted file mode 100644
index c830151..0000000
--- a/plugins/contacts-map/geo-utils.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- *		Cedric Bosdonnat <cedric.bosdonnat@free.fr>
- *
- * Copyright (C) 2009 Cedric Bosdonnat (http://cedric.bosdonnat.free.fr)
- *
- */
-
-#include <gtk/gtk.h>
-#include <glib.h>
-
-#include <libebook/e-book.h>
-#include <libebook/e-contact.h>
-
-#include <geoclue/geoclue-geocode.h>
-#include <champlain/champlain.h>
-#include <champlain-gtk/champlain-gtk.h>
-#include <clutter-gtk/clutter-gtk.h>
-
-void
-get_min_max (gdouble *min_lat, gdouble *max_lat,
-        gdouble *min_lng, gdouble *max_lng,
-        gdouble lat, gdouble lng);
-
-GeoclueGeocode *get_geocoder (void);
-
-void add_marker (
-        ChamplainLayer *layer,
-        gdouble lat, gdouble lng,
-        EContact *contact);
-
-GHashTable *get_geoclue_from_address (const EContactAddress* addr);
-
-void init_map (ChamplainView **view, GtkWidget **widget);
-
-void create_map_window (GtkWidget *map_widget, const gchar *title);
diff --git a/plugins/contacts-map/org-gnome-contacts-map.eplug.xml b/plugins/contacts-map/org-gnome-contacts-map.eplug.xml
deleted file mode 100644
index e695979..0000000
--- a/plugins/contacts-map/org-gnome-contacts-map.eplug.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<e-plugin-list>
-    <e-plugin id="org.gnome.evolution.contacts_maps" type="shlib" _name="Map for contacts"
-        location="@PLUGINDIR@/liborg-gnome-contacts-map@SOEXT@">
-        <author name="Cedric Bosdonnat" email="cedric.bosdonnat.ooo@free.fr"/>
-        <_description>Add a map showing the location of contacts when possible.</_description>
-      
-	<hook class="org.gnome.evolution.ui:1.0">
-        <ui-manager id="org.gnome.evolution.contacts" callback="addressbook_map_init">
-          <!-- Add something for contact-popup -->
-          <popup name="address-book-popup">
-            <menuitem action="contacts-map"/>
-          </popup>
-        </ui-manager>
-      </hook>
-
-    </e-plugin>
-</e-plugin-list>
-
