#include "utils.h"
#include "mapper-types.h"
#include "latlon.h"
-#include "map.h"
-#include "route.h"
#include "db.h"
#include "poi.h"
#include "gps.h"
#include "ui-common.h"
#include "settings.h"
-#include "gpx.h"
#include "filter.h"
#include "dialogs.h"
#include "map-tile-repo.h"
gconf_client_set_float(gconf_client, GCONF_KEY_LON, _gps->data.lon, NULL);
/* Save last center latitude/longitude. */
-unit2latlon(_center.unitx, _center.unity, center_lat, center_lon);
gconf_client_set_float(gconf_client, GCONF_KEY_CENTER_LAT, center_lat, NULL);
gconf_client_set_float(gconf_client, GCONF_KEY_CENTER_LON, center_lon, NULL);
gchar *config_dir;
gchar *str;
gint i;
-CenterMode _center_mode = CENTER_LEAD;
+GtkMapCenterMode _center_mode = CENTER_LEAD;
UnitType _units = UNITS_KM;
guint _degformat = DDPDDDDD;
InfoFontSize _info_font_size = INFO_FONT_MEDIUM;
_draw_width=mapper_gconf_get_int(GCONF_KEY_DRAW_WIDTH, 4);
/* Invalidate destination */
-_dest.valid=FALSE;
+_dest->valid=FALSE;
/* Get Announce Advance Notice - Default is 30. */
_announce_notice_ratio=mapper_gconf_get_int(GCONF_KEY_ANNOUNCE_NOTICE, 8);
_gps->data.lon=mapper_gconf_get_float(GCONF_KEY_LON, 22.20);
/* Special positions Home and Dest */
-config_load_position(&_home, GCONF_KEY_POSITION_HOME);
-config_load_position(&_dest, GCONF_KEY_POSITION_DEST);
+config_load_position(_home, GCONF_KEY_POSITION_HOME);
+config_load_position(_dest, GCONF_KEY_POSITION_DEST);
/* Get last center point. */
{
} else {
center_lon = _gps->data.lon;
}
-
- latlon2unit(center_lat, center_lon, _center.unitx, _center.unity);
}
config_load_repo();
/* Get last Zoom Level. Default is 12. */
value = gconf_client_get(gconf_client, GCONF_KEY_ZOOM, NULL);
if (value) {
- _zoom = gconf_value_get_int(value) / _curr_repo->view_zoom_steps * _curr_repo->view_zoom_steps;
+ _zoom=gconf_value_get_int(value) / _curr_repo->view_zoom_steps * _curr_repo->view_zoom_steps;
gconf_value_free(value);
} else {
- _zoom = 12 / _curr_repo->view_zoom_steps * _curr_repo->view_zoom_steps;
+ _zoom=12 / _curr_repo->view_zoom_steps * _curr_repo->view_zoom_steps;
}
-BOUND(_zoom, 0, MAX_ZOOM - 1);
-_world_size_tiles = unit2tile(WORLD_SIZE_UNITS);
+BOUND(_zoom, 0, 20);
/* Get Route Directory. Default is NULL. */
_route_dir_uri = gconf_client_get_string(gconf_client, GCONF_KEY_ROUTEDIR, NULL);