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 93 by harbaum, Wed Sep 2 12:25:51 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 33  Line 38 
38    
39  // #define MAP_SOURCE  OSM_GPS_MAP_SOURCE_OPENSTREETMAP  // #define MAP_SOURCE  OSM_GPS_MAP_SOURCE_OPENSTREETMAP
40  #define MAP_SOURCE  OSM_GPS_MAP_SOURCE_OPENCYCLEMAP  #define MAP_SOURCE  OSM_GPS_MAP_SOURCE_OPENCYCLEMAP
41    // #define MAP_SOURCE  OSM_GPS_MAP_SOURCE_GOOGLE_STREET
42  #define GPS_DEFAULT_ZOOM 13  #define GPS_DEFAULT_ZOOM 13
43    
44  #define PROXY_KEY  "/system/http_proxy/"  #define PROXY_KEY  "/system/http_proxy/"
# Line 451  static void on_window_destroy(GtkWidget Line 457  static void on_window_destroy(GtkWidget
457    context->appdata->map.pos.lat = lat;    context->appdata->map.pos.lat = lat;
458    context->appdata->map.pos.lon = lon;    context->appdata->map.pos.lon = lon;
459    
460      gint source;
461      g_object_get(map, "map-source", &source, NULL);
462      context->appdata->map.source = source;
463    
464  #if MAEMO_VERSION_MAJOR == 5  #if MAEMO_VERSION_MAJOR == 5
465    /* restore cur_view */    /* restore cur_view */
466    context->appdata->cur_view = context->old_view;    context->appdata->cur_view = context->old_view;
# Line 520  void map(appdata_t *appdata) { Line 530  void map(appdata_t *appdata) {
530    
531    const char *proxy = get_proxy_uri(appdata);    const char *proxy = get_proxy_uri(appdata);
532    
533      gint source = context->appdata->map.source;
534      if(!source) source = MAP_SOURCE;
535    
536    context->widget = g_object_new(OSM_TYPE_GPS_MAP,    context->widget = g_object_new(OSM_TYPE_GPS_MAP,
537                   "map-source",               MAP_SOURCE,                   "map-source",               source,
538                   "tile-cache",               path,                   "tile-cache",               path,
539                   "auto-center",              FALSE,                   "auto-center",              FALSE,
540                   "record-trip-history",      FALSE,                   "record-trip-history",      FALSE,

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