From ca8f2626c4614d197823c7f9c9c233dcd541c2d4 Mon Sep 17 00:00:00 2001 From: noirauds Date: Sat, 8 Feb 2014 12:53:34 +0100 Subject: [PATCH] bug 7368 : Geography gramplet does not communicate over proxy server with autorisation. --- src/plugins/lib/maps/grampsmaps.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/lib/maps/grampsmaps.py b/src/plugins/lib/maps/grampsmaps.py index 3c5134d0a..4289396ca 100644 --- a/src/plugins/lib/maps/grampsmaps.py +++ b/src/plugins/lib/maps/grampsmaps.py @@ -188,11 +188,17 @@ class osmGpsMap(): constants.map_title[map_type]) config.set("geography.map_service", map_type) self.current_map = map_type + http_proxy = os.environ['http_proxy'] if 0: self.osm = DummyMapNoGpsPoint() else: - self.osm = osmgpsmap.GpsMap(tile_cache=tiles_path, - map_source=constants.map_type[map_type]) + if http_proxy == "": + self.osm = osmgpsmap.GpsMap(tile_cache=tiles_path, + map_source=constants.map_type[map_type]) + else: + self.osm = osmgpsmap.GpsMap(tile_cache=tiles_path, + proxy_uri=http_proxy, + map_source=constants.map_type[map_type]) current_map = osmgpsmap.GpsMapOsd( show_dpad=False, show_zoom=True) self.end_selection = None self.osm.layer_add(current_map)