unit2latlon(priv->center.unitx, priv->center.unity, lat, lon);
}
+/**
+ * gtk_map_goto_position:
+ * @pos: A Position to center on
+ *
+ * Centers map view on given Position if it's valid.
+ *
+ * Returns TRUE if Position was valid and view was centered. FALSE otherwise.
+ */
+gboolean
+gtk_map_goto_position(GtkWidget *widget, Position *pos)
+{
+g_return_if_fail(GTK_IS_MAP(widget));
+g_return_if_fail(pos);
+
+if (pos->valid==FALSE)
+ return FALSE;
+gtk_map_set_center_latlon(widget, pos->lat, pos->lon);
+return TRUE;
+}
+
/**
* gtk_map_pan:
* @delta_x:
void gtk_map_set_center_latlon(GtkWidget *map, gdouble lat, gdouble lon);
void gtk_map_get_center_latlon(GtkWidget *map, gdouble *lat, gdouble *lon);
+gboolean gtk_map_goto_position(GtkWidget *widget, Position *pos);
+
gboolean gtk_map_set_center_mode(GtkWidget *widget, GtkMapCenterMode mode);
GtkMapCenterMode gtk_map_get_center_mode(GtkWidget *widget);