switch (prop_id) {
case PROP_CENTER_MODE:
- gtk_map_set_center_mode(map, g_value_get_int(value));
+ gtk_map_set_center_mode(GTK_WIDGET(map), g_value_get_int(value));
break;
case PROP_SHOW_VELVEC:
priv->show_velvec=g_value_get_boolean(value);
return FALSE;
for (zoff = (priv->curr_repo->double_size ? 1 : 0); !pixbuf && (priv->zoom + zoff) <= priv->max_zoom && zoff <= GTK_MAP_TILE_SIZE_P2; zoff += 1) {
- pixbuf=gtk_map_tile_load(map, tilex, tiley, zoff, !fast_fail);
+ pixbuf=gtk_map_tile_load(GTK_WIDGET(map), tilex, tiley, zoff, !fast_fail);
if (!pixbuf) {
if (!fast_fail)
fast_fail=TRUE;
/******************************************************************************/
+GtkMapCenterMode
+gtk_map_get_center_mode(GtkWidget *widget)
+{
+GtkMap *map;
+GtkMapPriv *priv;
+
+g_return_val_if_fail(GTK_IS_MAP(widget), CENTER_MANUAL);
+
+map=GTK_MAP(widget);
+priv=GTK_MAP_GET_PRIVATE(map);
+
+return priv->center_mode;
+}
+
/**
* gtk_map_set_center_mode:
* @mode: Centering mode
GtkMap *map;
GtkMapPriv *priv;
-g_return_if_fail(GTK_IS_MAP(widget));
+g_return_val_if_fail(GTK_IS_MAP(widget), FALSE);
+
map=GTK_MAP(widget);
priv=GTK_MAP_GET_PRIVATE(map);
void gtk_map_get_center_latlon(GtkWidget *map, gdouble *lat, gdouble *lon);
gboolean gtk_map_set_center_mode(GtkWidget *widget, GtkMapCenterMode mode);
+GtkMapCenterMode gtk_map_get_center_mode(GtkWidget *widget);
void gtk_map_pan(GtkWidget *map, gint delta_unitx, gint delta_unity);