2006-12-07 Zsolt Foldvari <zfoldvar@users.sourceforge.net>

* src/DataViews/_PlaceView.py (google): Use city, country of main
	location in google query.



svn: r7766
This commit is contained in:
Zsolt Foldvari 2006-12-06 23:31:54 +00:00
parent 2df0dd959a
commit 5230cb6b85
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2006-12-07 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
* src/DataViews/_PlaceView.py (google): Use city, country of main
location in google query.
2006-12-06 Alex Roitman <shura@gramps-project.org>
* src/Makefile.am (gdir_PYTHON): Ship new file.

View File

@ -147,9 +147,13 @@ class PlaceView(PageView.ListView):
longitude = place.get_longitude()
latitude = place.get_latitude()
latitude,longitude = conv_lat_lon(latitude,longitude,"D.D8")
city = place.get_main_location().get_city()
country = place.get_main_location().get_country()
if longitude and latitude:
path = "http://maps.google.com/?sll=%s,%s&z=15" % (latitude,longitude)
elif city and country:
path = "http://maps.google.com/maps?q=%s,%s" % (city,country)
else:
path = "http://maps.google.com/maps?q=%s" % '+'.join(descr.split())
GrampsDisplay.url(path)