From 5d7f92a4fc4a04cdb1f69ab011b23566ef1f3816 Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Tue, 8 Sep 2009 21:28:27 +0000 Subject: [PATCH] GeoView : 2 bugs : swap map and saving zoom when no title. svn: r13180 --- src/DataViews/GeoView.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/DataViews/GeoView.py b/src/DataViews/GeoView.py index 1b3798bb0..d96bb1d29 100644 --- a/src/DataViews/GeoView.py +++ b/src/DataViews/GeoView.py @@ -262,11 +262,14 @@ class GeoView(HtmlView): res = self.dbstate.db.get_researcher() if res: # Don't modify the current values if no db is loaded. start = 0 - title = ZOOMANDPOS.search(self.renderer.title, start) - if title: - self.realzoom = title.group(1) - self.reallatitude = title.group(2) - self.reallongitude = title.group(3) + try: + title = ZOOMANDPOS.search(self.renderer.title, start) + if title: + self.realzoom = title.group(1) + self.reallatitude = title.group(2) + self.reallongitude = title.group(3) + except: + pass def _change_map(self, usedmap): """ @@ -737,18 +740,18 @@ class GeoView(HtmlView): self.mapview.write("maps?file=api&v=2\"\n") self.mapview.write(" type=\"text/javascript\">\n") self.mapview.write("\n") - if self.usedmap == "microsoft": + if _alternate_map() == "microsoft": self.mapview.write("\n") - elif self.usedmap == "yahoo": + elif _alternate_map() == "yahoo": self.mapview.write("\n") - elif self.usedmap == "openlayers": + elif _alternate_map() == "openlayers": self.mapview.write("