[mapguide-trac] #678: Vertical Extent of Rendering Excessive -
or Labels 'Apparently' Missing
MapGuide Open Source
trac_mapguide at osgeo.org
Tue Jan 27 05:57:31 EST 2009
#678: Vertical Extent of Rendering Excessive - or Labels 'Apparently' Missing
--------------------------+-------------------------------------------------
Reporter: crispinatime | Owner:
Type: defect | Status: new
Priority: medium | Milestone:
Component: General | Version: 2.0.1
Severity: minor | Resolution:
Keywords: | External_id:
--------------------------+-------------------------------------------------
Comment (by cagray):
Hi,
I work at 1Spatial with Crispin and have found a fix for this issue. The
issue is caused by the definition of mapDevH in the ajaxmappane.templ file
using offsetHeight. This can be resolved by using the clientHeight of the
document body instead. This works because the map is in an iframe so the
clientHeight refers to the iframe and not the whole browser. Change the
code below as follows in ajaxmappane.templ:
in the delayedInit function change:
mapDevH = safari? document.body.clientHeight: mapCell.clientHeight;
//height of inner elements not set on safari
to:
'''mapDevH = document.body.clientHeight;'''
And in the ResizeMapSpace function change:
mapDevH = safari? document.body.offsetHeight: mapCell.offsetHeight;
to:
'''mapDevH = document.body.clientHeight;'''
Finally to make this work in all browsers you need to set the vertical
alignment of the table cell the map is in:
so:
<td id="map" onmouseout="return ExitMap(event)">
becomes:
'''<td id="map" onmouseout="return ExitMap(event)" style="vertical-
align: top;">'''
Now when you pan up or down you will see the map get cut off at the map
frames top and bottom edges and also if you reduce the height of your map
it will resize to the new height instead of rendering the map too large
height wise. I tested this in IE6/7, Firefox 3, Opera, Safari and Chrome
and it seemed to work fine in each of them.
Thanks
Colin
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/678#comment:7>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list