resize_viewport(view);
clutter_container_remove_actor (CLUTTER_CONTAINER (priv->map_layer), group);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->map_layer), priv->map->current_level->group);
- champlain_view_center_on(view, lon2, lat2);
+ champlain_view_center_on(view, lat2, lon2);
g_object_notify(G_OBJECT(view), "zoom-level");
}
if (center)
{
- champlain_view_center_on(view, priv->longitude, priv->latitude);
+ champlain_view_center_on(view, priv->latitude, priv->longitude);
}
}
{
gdouble lon = g_value_get_double(value);
gdouble lat = viewport_get_current_latitude(priv);
- champlain_view_center_on(view, lon, lat);
+ champlain_view_center_on(view, lat, lon);
break;
}
case PROP_LATITUDE:
{
gdouble lon = viewport_get_current_longitude(priv);
gdouble lat = g_value_get_double(value);
- champlain_view_center_on(view, lon, lat);
+ champlain_view_center_on(view, lat, lon);
break;
}
case PROP_ZOOM_LEVEL:
if (level != priv->map->current_level->level)
{
ClutterActor *group = priv->map->current_level->group;
- gdouble lon = viewport_get_current_longitude(priv);
gdouble lat = viewport_get_current_latitude(priv);
+ gdouble lon = viewport_get_current_longitude(priv);
if (map_zoom_to(priv->map, level))
{
resize_viewport(view);
clutter_container_remove_actor (CLUTTER_CONTAINER (priv->map_layer), group);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->map_layer), priv->map->current_level->group);
- champlain_view_center_on(view, lon, lat);
+ champlain_view_center_on(view, lat, lon);
}
}
}
/**
* champlain_view_center_on:
* @view: a #ChamplainView
- * @longitude: the longitude to center the map at
* @latitude: the longitude to center the map at
+ * @longitude: the longitude to center the map at
*
* Centers the map on these coordinates.
*
*/
// FIXME: Animate this. Can be done in Tidy-Adjustment (like for elastic effect)
void
-champlain_view_center_on (ChamplainView *view, gdouble longitude, gdouble latitude)
+champlain_view_center_on (ChamplainView *view, gdouble latitude, gdouble longitude)
{
ChamplainViewPrivate *priv = CHAMPLAIN_VIEW_GET_PRIVATE (view);
resize_viewport(view);
clutter_container_remove_actor (CLUTTER_CONTAINER (priv->map_layer), group);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->map_layer), priv->map->current_level->group);
- champlain_view_center_on(view, lon, lat);
+ champlain_view_center_on(view, lat, lon);
g_object_notify(G_OBJECT(view), "zoom-level");
}
resize_viewport(view);
clutter_container_remove_actor (CLUTTER_CONTAINER (priv->map_layer), group);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->map_layer), priv->map->current_level->group);
- champlain_view_center_on(view, lon, lat);
+ champlain_view_center_on(view, lat, lon);
g_object_notify(G_OBJECT(view), "zoom-level");
}
if(priv->map)
marker_reposition(view);
- g_signal_connect (layer,
+ g_signal_connect_after (layer,
"add",
G_CALLBACK (layer_add_marker_cb),
view);
ClutterColor orange = { 0xf3, 0x94, 0x07, 0xbb };
ClutterColor white = { 0xff, 0xff, 0xff, 0xff };
marker = champlain_marker_new_with_label("Montréal", "Airmole 14", NULL, NULL);
- champlain_marker_set_position(CHAMPLAIN_MARKER(marker), -73.563788, 45.528178);
+ champlain_marker_set_position(CHAMPLAIN_MARKER(marker), 45.528178, -73.563788);
clutter_container_add(CLUTTER_CONTAINER(layer), marker, NULL);
marker = champlain_marker_new_with_label("New York", "Sans 25", &white, NULL);
- champlain_marker_set_position(CHAMPLAIN_MARKER(marker), -73.98, 40.77);
+ champlain_marker_set_position(CHAMPLAIN_MARKER(marker), 40.77, -73.98);
clutter_container_add(CLUTTER_CONTAINER(layer), marker, NULL);
marker = champlain_marker_new_with_label("Saint-Tite-des-Caps", "Serif 12", NULL, &orange);
- champlain_marker_set_position(CHAMPLAIN_MARKER(marker), -70.764141, 47.130885);
+ champlain_marker_set_position(CHAMPLAIN_MARKER(marker), 47.130885, -70.764141);
clutter_container_add(CLUTTER_CONTAINER(layer), marker, NULL);
clutter_actor_hide(layer);
champlain_view_add_layer(actor, layer);
clutter_container_add_actor (CLUTTER_CONTAINER (stage), actor);
- champlain_view_center_on(CHAMPLAIN_VIEW(actor), -73.75, 45.466);
+ champlain_view_center_on(CHAMPLAIN_VIEW(actor), 45.466, -73.75);
clutter_actor_show (stage);
clutter_main ();