ChamplainViewPrivate *priv = CHAMPLAIN_VIEW_GET_PRIVATE (view);
+ priv->longitude = longitude;
+ priv->latitude = latitude;
+
if(!priv->map)
- {
- // keep until the viewport is created
- priv->longitude = longitude;
- priv->latitude = latitude;
- return;
- }
+ return;
- gdouble x, y;
+ gint x, y;
x = priv->map->longitude_to_x(priv->map, longitude, priv->map->current_level->level);
y = priv->map->latitude_to_y(priv->map, latitude, priv->map->current_level->level);
ChamplainPoint* anchor = &priv->map->current_level->anchor;