Diff of /trunk/src/map-tool.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 86 by harbaum, Sun Aug 30 19:05:44 2009 UTC revision 98 by harbaum, Mon Sep 7 13:20:37 2009 UTC
# Line 17  Line 17 
17   * along with GPXView.  If not, see <http://www.gnu.org/licenses/>.   * along with GPXView.  If not, see <http://www.gnu.org/licenses/>.
18   */   */
19    
20    /*
21     * http://topo.geofabrik.de/relief/${z}/${x}/${y}.png  8-15
22     * http://topo.geofabrik.de/trail/${z}/${x}/${y}.png   8-15
23     */
24    
25  #include "gpxview.h"  #include "gpxview.h"
26  #include "converter.h"  #include "converter.h"
27  #include <math.h>    // for isnan  #include <math.h>    // for isnan
# Line 31  Line 36 
36  #include <X11/Xatom.h>  #include <X11/Xatom.h>
37  #endif  #endif
38    
39  // #define MAP_SOURCE  OSM_GPS_MAP_SOURCE_OPENSTREETMAP  /* default values */
40  #define MAP_SOURCE  OSM_GPS_MAP_SOURCE_OPENCYCLEMAP  #define MAP_SOURCE  OSM_GPS_MAP_SOURCE_OPENCYCLEMAP
41  #define GPS_DEFAULT_ZOOM 13  #define GPS_DEFAULT_ZOOM 13
42    
# Line 451  static void on_window_destroy(GtkWidget Line 456  static void on_window_destroy(GtkWidget
456    context->appdata->map.pos.lat = lat;    context->appdata->map.pos.lat = lat;
457    context->appdata->map.pos.lon = lon;    context->appdata->map.pos.lon = lon;
458    
459      gint source;
460      g_object_get(map, "map-source", &source, NULL);
461      context->appdata->map.source = source;
462    
463  #if MAEMO_VERSION_MAJOR == 5  #if MAEMO_VERSION_MAJOR == 5
464    /* restore cur_view */    /* restore cur_view */
465    context->appdata->cur_view = context->old_view;    context->appdata->cur_view = context->old_view;
# Line 520  void map(appdata_t *appdata) { Line 529  void map(appdata_t *appdata) {
529    
530    const char *proxy = get_proxy_uri(appdata);    const char *proxy = get_proxy_uri(appdata);
531    
532      gint source = context->appdata->map.source;
533      if(!source) source = MAP_SOURCE;
534    
535    context->widget = g_object_new(OSM_TYPE_GPS_MAP,    context->widget = g_object_new(OSM_TYPE_GPS_MAP,
536                   "map-source",               MAP_SOURCE,                   "map-source",               source,
537                   "tile-cache",               path,                   "tile-cache",               path,
538                   "auto-center",              FALSE,                   "auto-center",              FALSE,
539                   "record-trip-history",      FALSE,                   "record-trip-history",      FALSE,

Legend:
Removed from v.86  
changed lines
  Added in v.98