mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Make the map provider choice a preference
Not all of the providers seem to work for me (Yahoo Satellite doesn't appear to give me any data), but for now I'll leave most of them in. We can later decide to offer only some of them. It might be more fun to be able to pick the provider directly from the map widget. But for now I kept this in the preferences which seemed to be a good place for it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b24d0f2f60
commit
d1c394e51f
5 changed files with 66 additions and 14 deletions
8
gps.c
8
gps.c
|
|
@ -17,12 +17,6 @@
|
|||
static GtkWidget *window = NULL;
|
||||
static OsmGpsMap *map = NULL;
|
||||
|
||||
/* Several map providers are available, such as OSM_GPS_MAP_SOURCE_OPENSTREETMAP
|
||||
and OSM_GPS_MAP_SOURCE_GOOGLE_STREET. We should make more of
|
||||
them available from e.g. a pull-down menu */
|
||||
static OsmGpsMapSource_t opt_map_provider = OSM_GPS_MAP_SOURCE_VIRTUAL_EARTH_HYBRID;
|
||||
|
||||
|
||||
static void on_close(GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
GtkWidget **window = user_data;
|
||||
|
|
@ -168,7 +162,7 @@ OsmGpsMap *init_map(void)
|
|||
cachedir = g_strdup(OSM_GPS_MAP_CACHE_AUTO);
|
||||
|
||||
map = g_object_new(OSM_TYPE_GPS_MAP,
|
||||
"map-source", opt_map_provider,
|
||||
"map-source", prefs.map_provider,
|
||||
"tile-cache", cachedir,
|
||||
"tile-cache-base", cachebasedir,
|
||||
"proxy-uri", g_getenv("http_proxy"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue