diff --git a/src/data/Mapstraction.css b/src/data/Mapstraction.css index 92aed7dad..a4fb65e0b 100644 --- a/src/data/Mapstraction.css +++ b/src/data/Mapstraction.css @@ -35,9 +35,15 @@ div#middle { float: center; height: 400px; width: 60%; - margin: 10px 0px 10px 0px; + margin: 10px 0px 6px 0px; padding: 0% 20% 0% 20%; } +div#middle div#location { + margin-top: 6px; + font: normal 12px sans-serif; + text-align: center; + width: 80%; +} /* geo-info bubble ------------------------------------------------- */ diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index cba34ff43..193831867 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -104,7 +104,7 @@ from libhtml import Html from libhtmlbackend import HtmlBackend from libgedcom import make_gedcom_date - +from PlaceUtils import conv_lat_lon #------------------------------------------------------------------------ # # constants @@ -342,8 +342,10 @@ class BasePage(object): will create the place map @param: placedetail -- Html instance page + @param: head -- the section of the web page @param: latitude -- GPS Latitude from place @param: Longitude -- GPS Longitude from place + @param: place_title - place description for InfoBubble """ # add Mapstraction CSS @@ -381,7 +383,6 @@ class BasePage(object): //%s'); """ % place_title jsc += """ + // add marker to map map.addMarker(marker, true); } //]]>""" -# there is no need to add an ending "" as it will be added automatically! + # there is no need to add an ending "", + # as it will be added automatically! + # googlev3 division middle += Html("div", id = "googlev3", inline = True) + + # add place title to middle section + middle += Html("div", place_title, id = "location", inline = True) + # return placedetail division back to its callers return placedetail, head @@ -1908,7 +1919,6 @@ class BasePage(object): @param: place -- place object from the database @param: table -- table from Placedetail - @param: gid -- place gramps id """ if not place: @@ -2488,12 +2498,22 @@ class PlacePage(BasePage): # add place map here if self.placemaps: - if place.lat and place.long: + if place: + if place.lat and place.long: + realatitude, realongitude = conv_lat_lon( + place.lat, + place.long, + "D.D8") - self._create_place_map(placedetail, head, place.lat, place.long, self.page_title) + # create place map using realatitude and realongitude + self._create_place_map( + placedetail, + head, + realatitude, realongitude, + self.page_title) - # add javascript function call to body element - body.attr = 'onload = "initialize();"' + # add javascript function call to body element + body.attr = 'onload = "initialize();"' # source references srcrefs = self.display_ind_sources(place)