Add border to place map and added info-bubble to left-click on marker.
svn: r15561
This commit is contained in:
parent
570cf9a5df
commit
3d2daa22f4
@ -2333,11 +2333,13 @@ class PlacePage(BasePage):
|
|||||||
"""
|
"""
|
||||||
creates the individual place pages
|
creates the individual place pages
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.bibli = Bibliography()
|
self.bibli = Bibliography()
|
||||||
db = report.database
|
db = report.database
|
||||||
|
|
||||||
place = db.get_place_from_handle(place_handle)
|
place = db.get_place_from_handle(place_handle)
|
||||||
|
|
||||||
|
# if place exists, but has nothing, return
|
||||||
|
if not place:
|
||||||
|
return None
|
||||||
BasePage.__init__(self, report, title, place.gramps_id)
|
BasePage.__init__(self, report, title, place.gramps_id)
|
||||||
|
|
||||||
of = self.report.create_file(place.get_handle(), "plc")
|
of = self.report.create_file(place.get_handle(), "plc")
|
||||||
@ -2348,6 +2350,7 @@ class PlacePage(BasePage):
|
|||||||
# determine if we will be creating Place Maps or not?
|
# determine if we will be creating Place Maps or not?
|
||||||
if self.placemaps:
|
if self.placemaps:
|
||||||
if place.lat and place.long:
|
if place.lat and place.long:
|
||||||
|
place_title = ReportUtils.place_name(db, place_handle)
|
||||||
|
|
||||||
head += Html("script", type = "text/javascript",
|
head += Html("script", type = "text/javascript",
|
||||||
src = "http://maps.google.com/maps/api/js?sensor=false", inline = True)
|
src = "http://maps.google.com/maps/api/js?sensor=false", inline = True)
|
||||||
@ -2363,16 +2366,21 @@ class PlacePage(BasePage):
|
|||||||
div#maps {
|
div#maps {
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#googlev3 {
|
div#googlev3 {
|
||||||
height: 400px;
|
height: 400px;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
display: none;
|
display: none;
|
||||||
border: solid 1px #000;
|
border: solid 2px #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#openlayers {
|
div#openlayers {
|
||||||
height: 400px;
|
height: 400px;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
border: solid 1px #000;
|
border: solid 2px #000;
|
||||||
|
}
|
||||||
|
div#geo-info {
|
||||||
|
font: normal .6em sans;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -2403,8 +2411,11 @@ class PlacePage(BasePage):
|
|||||||
|
|
||||||
function add_marker() {
|
function add_marker() {
|
||||||
marker = new mxn.Marker(latlon);
|
marker = new mxn.Marker(latlon);
|
||||||
marker.setLabel('The label');
|
marker.setLabel('The Label');
|
||||||
marker.setInfoBubble('<div id="geo-info" >Info bubble</div>');
|
|
||||||
|
marker.setInfoBubble('<div id="geo-info" >%s</div>'); """ % place_title
|
||||||
|
|
||||||
|
inline_script += """
|
||||||
// openlayers mapstraction problem here : drift if anchor.
|
// openlayers mapstraction problem here : drift if anchor.
|
||||||
if ( provider == 'googlev3' ) {
|
if ( provider == 'googlev3' ) {
|
||||||
marker.setIcon('../../../images/gramps-geo-' +icon+ '.png',
|
marker.setIcon('../../../images/gramps-geo-' +icon+ '.png',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user