539 |
if(gps_on && gps_get_pos(context->area->appdata, &pos, NULL)) { |
if(gps_on && gps_get_pos(context->area->appdata, &pos, NULL)) { |
540 |
osm_gps_map_set_center(OSM_GPS_MAP(context->map.widget), |
osm_gps_map_set_center(OSM_GPS_MAP(context->map.widget), |
541 |
pos.lat, pos.lon); |
pos.lat, pos.lon); |
542 |
|
|
543 |
|
/* re-enable centering */ |
544 |
|
g_object_set(context->map.widget, "auto-center", TRUE, NULL); |
545 |
} |
} |
546 |
} |
} |
547 |
} |
} |
644 |
context.map.widget = g_object_new(OSM_TYPE_GPS_MAP, |
context.map.widget = g_object_new(OSM_TYPE_GPS_MAP, |
645 |
"map-source", OSM_GPS_MAP_SOURCE_OPENSTREETMAP, |
"map-source", OSM_GPS_MAP_SOURCE_OPENSTREETMAP, |
646 |
"proxy-uri", misc_get_proxy_uri(area->settings), |
"proxy-uri", misc_get_proxy_uri(area->settings), |
647 |
|
"auto-center", FALSE, |
648 |
"tile-cache", NULL, |
"tile-cache", NULL, |
649 |
NULL); |
NULL); |
650 |
|
|