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:
parent
5bf3d98930
commit
75526dbc76
@ -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.
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user