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 |
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 |
|
|
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; |
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, |