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

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

revision 60 by harbaum, Mon Aug 17 19:44:00 2009 UTC revision 61 by harbaum, Tue Aug 18 14:32:45 2009 UTC
# Line 18  Line 18 
18   */   */
19    
20  #include "gpxview.h"  #include "gpxview.h"
21    #include "converter.h"
22  #include <math.h>    // for isnan  #include <math.h>    // for isnan
23    
24  #ifdef ENABLE_OSM_GPS_MAP  #ifdef ENABLE_OSM_GPS_MAP
# Line 27  Line 28 
28  #define MAP_SOURCE  OSM_GPS_MAP_SOURCE_OPENSTREETMAP  #define MAP_SOURCE  OSM_GPS_MAP_SOURCE_OPENSTREETMAP
29  #define GPS_DEFAULT_ZOOM 13  #define GPS_DEFAULT_ZOOM 13
30    
 /* equatorial radius in meters */  
 #define EQ_RADIUS     (6378137.0)  
   
 #define RAD2DEG(a)  (((a)*180.0)/M_PI)  
 #define DEG2RAD(a)  (((a)*M_PI)/180.0)  
   
31  #define PROXY_KEY  "/system/http_proxy/"  #define PROXY_KEY  "/system/http_proxy/"
32    
33  static const char *get_proxy_uri(appdata_t *appdata) {  static const char *get_proxy_uri(appdata_t *appdata) {
# Line 83  static void map_zoom(map_context_t *cont Line 78  static void map_zoom(map_context_t *cont
78    gtk_widget_set_sensitive(context->zoomout,    gtk_widget_set_sensitive(context->zoomout,
79             zoom > osm_gps_map_source_get_min_zoom(MAP_SOURCE));             zoom > osm_gps_map_source_get_min_zoom(MAP_SOURCE));
80    
   /* hmm ... this doesn't really work */  
   osm_gps_map_osd_speed(map, zoom);  
   
81    /* save new zoom */    /* save new zoom */
82    context->appdata->map.zoom = zoom;    context->appdata->map.zoom = zoom;
83  }  }
# Line 251  static cache_t *map_closest(map_context_ Line 243  static cache_t *map_closest(map_context_
243  /* translate between osm-gps-map positions and gpxview ones */  /* translate between osm-gps-map positions and gpxview ones */
244  pos_t coord2pos(coord_t coo) {  pos_t coord2pos(coord_t coo) {
245    pos_t pos;    pos_t pos;
246    pos.lat = RAD2DEG(coo.rlat);    pos.lat = rad2deg(coo.rlat);
247    pos.lon = RAD2DEG(coo.rlon);    pos.lon = rad2deg(coo.rlon);
248    return pos;    return pos;
249  }  }
250    

Legend:
Removed from v.60  
changed lines
  Added in v.61