diff --git a/gramps/plugins/mapservices/googlemap.py b/gramps/plugins/mapservices/googlemap.py index 92fc01523..d513d9573 100644 --- a/gramps/plugins/mapservices/googlemap.py +++ b/gramps/plugins/mapservices/googlemap.py @@ -45,7 +45,6 @@ class GoogleMapService(MapService): def calc_url(self): """ Determine the url to use on maps.google.com Logic: use lat lon if present - otherwise use city and country if present otherwise use description of the place """ place = self._get_first_place()[0] @@ -55,13 +54,6 @@ class GoogleMapService(MapService): longitude) return - location = get_main_location(self.database, place) - city = location.get(PlaceType.CITY) - country = location.get(PlaceType.COUNTRY) - if city and country: - self.url = "http://maps.google.com/maps?q=%s,%s" % (city, country) - return - titledescr = place_displayer.display(self.database, place) self.url = "http://maps.google.com/maps?q=%s" % \ '+'.join(titledescr.split()) diff --git a/gramps/plugins/mapservices/openstreetmap.py b/gramps/plugins/mapservices/openstreetmap.py index 0e919bb63..9bd3aa8bb 100644 --- a/gramps/plugins/mapservices/openstreetmap.py +++ b/gramps/plugins/mapservices/openstreetmap.py @@ -46,8 +46,7 @@ class OpensStreetMapService(MapService): def calc_url(self): """ Determine the url to use - Logic: use lat lon if present - otherwise use city and country if present + Logic: Use lat lon if present otherwise use description of the place """ place = self._get_first_place()[0] @@ -58,14 +57,6 @@ class OpensStreetMapService(MapService): return - location = get_main_location(self.database, place) - city = location.get(PlaceType.CITY) - country = location.get(PlaceType.COUNTRY) - if city and country: - self.url = "http://nominatim.openstreetmap.org/"\ - "search.php?q=%s%%2C%s" % (city, country) - return - titledescr = place_displayer.display(self.database, place) self.url = "http://nominatim.openstreetmap.org/"\ "search.php?q=%s" % '+'.join(titledescr.split())