Changed behavior of "Look up with Map Services"

Removed the section that looked up by city, and country from the Map
Services lookup for Google and Open Street Map.

Resolves #9486
This commit is contained in:
Jgon6 2018-02-23 14:56:52 -05:00 committed by Nick Hall
parent 59bd9f040d
commit 0ae51c9522
2 changed files with 1 additions and 18 deletions

View File

@ -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())

View File

@ -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())