From 892eccf2510648180e4517aed46970f8780a3362 Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Mon, 13 May 2013 16:51:33 +0000 Subject: [PATCH] Geography : bug #6718 : The active place must have valid coordinates to set center and zoom. svn: r22280 --- gramps/plugins/view/geoplaces.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gramps/plugins/view/geoplaces.py b/gramps/plugins/view/geoplaces.py index d82dbc338..3f6570c3d 100644 --- a/gramps/plugins/view/geoplaces.py +++ b/gramps/plugins/view/geoplaces.py @@ -264,9 +264,10 @@ class GeoPlaces(GeoGraphyView): self._create_one_place(place) if place_x: place = dbstate.db.get_place_from_handle(place_x) - self.osm.set_center_and_zoom(float(place.get_latitude()), - float(place.get_longitude()), - int(config.get("geography.zoom"))) + if ( place.get_latitude() != "" and place.get_longitude() != "" ): + self.osm.set_center_and_zoom(float(place.get_latitude()), + float(place.get_longitude()), + int(config.get("geography.zoom"))) _LOG.debug(" stop createmap.") _LOG.debug("%s" % time.strftime("begin sort : " "%a %d %b %Y %H:%M:%S", time.gmtime()))