gint zoom_level,
gint x,
gint y);
+static void tile_state_notify (GObject *gobject,
+ GParamSpec *pspec,
+ gpointer data);
static gdouble
viewport_get_longitude_at (ChamplainViewPrivate *priv, gint x)
DEBUG ("Loading tile %d, %d, %d", champlain_zoom_level_get_zoom_level (level), i, j);
ChamplainTile *tile = champlain_tile_new ();
g_object_set (G_OBJECT (tile), "x", i, "y", j, NULL);
- champlain_map_source_get_tile (priv->map_source, view, level, tile);
+
+ g_signal_connect (tile, "notify::state", G_CALLBACK (tile_state_notify), view);
+
champlain_zoom_level_add_tile (level, tile);
+ champlain_map_source_get_tile (priv->map_source, view, level, tile);
+
g_object_unref (tile);
}
}
clutter_container_add (CLUTTER_CONTAINER (champlain_zoom_level_get_actor (level)), actor, NULL);
clutter_actor_show (actor);
view_position_tile (view, tile);
-
- view_update_state (view);
}
void
ChamplainZoomLevel *level,
ChamplainTile *tile)
{
- view_update_state (view);
}
void
clutter_actor_show (actor);
view_position_tile (view, tile);
- view_update_state (view);
+}
+
+static void
+tile_state_notify (GObject *gobject,
+ GParamSpec *pspec,
+ gpointer data)
+{
+ view_update_state (CHAMPLAIN_VIEW(data));
}
static void
g_object_notify (G_OBJECT (view), "zoom-level");
return TRUE;
}
-