# -*- python -*- # -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007-2009 Serge Noiraud # Copyright (C) 2008 Benny Malengier # Copyright (C) 2009 Gerald Britton # Copyright (C) 2009 Helge GRAMPS # Copyright (C) 2009 Josip # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id$ """ Geo View """ #------------------------------------------------------------------------- # # Python modules # #------------------------------------------------------------------------- from gettext import gettext as _ import os import urlparse import const import operator import locale #------------------------------------------------------------------------- # # GTK/Gnome modules # #------------------------------------------------------------------------- import gtk #------------------------------------------------------------------------- # # Gramps Modules # #------------------------------------------------------------------------- import gen.lib import Utils import config import PageView from gui.utils import add_menuitem from ReportBase import CSS_FILES from BasicUtils import name_displayer as _nd from PlaceUtils import conv_lat_lon from gui.views.pageview import PageView #------------------------------------------------------------------------- # # map icons # #------------------------------------------------------------------------- _ICONS = { gen.lib.EventType.BIRTH : 'gramps-geo-birth', gen.lib.EventType.DEATH : 'gramps-geo-death', gen.lib.EventType.MARRIAGE : 'gramps-geo-marriage', } #------------------------------------------------------------------------- # # regexp for html title Notes ... # #------------------------------------------------------------------------- import re ZOOMANDPOS = re.compile('zoom=([0-9]*) coord=([0-9\.\-\+]*), ([0-9\.\-\+]*):::') #------------------------------------------------------------------------- # # Web interfaces # #------------------------------------------------------------------------- URL_SEP = '/' from HtmlRenderer import HtmlView #------------------------------------------------------------------------- # # Constants # #------------------------------------------------------------------------- GEOVIEW_SUBPATH = Utils.get_empty_tempdir('geoview') NB_MARKERS_PER_PAGE = 200 #------------------------------------------------------------------------- # # Javascript template # #------------------------------------------------------------------------- _HTMLHEADER = '''
'), 'back' : _('Back to prior page'), 'css' : self._add_stylesheet() } end = """ """ ufd = open(self.without_coord_file, "w+") ufd.write(data) self.places = sorted(self.place_without_coordinates) i = 1 ufd.write("
NB | ") ufd.write("Gramps ID | Place | ") for place in self.places: ufd.write("
---|---|---|
%d | %s | %s |