[OpenLayers-Dev] Little glitch when zoom out with transition:'resize'

Gael Lafond G.Lafond at aims.gov.au
Mon Jan 24 18:55:11 EST 2011


Hello,

I notice a little glitch when zoom out on a layer that have
transition:'resize'.

It's nothing big but I think it can be fix quite easily.


The Bug:

On Firefox - Ubuntu: When I zoom out enough to have the tiles resized to
8px x 8px, I only see a line of 1 pixel for each tiles.

On Firefox - Windows XP: Similar, but I don't even see the 1 pixel line.
Only white tiles.

The problem do not occur in IE 7.


The Fix:

I suspect this problem to be cause by some padding added by the browser
to render fonts. It can be solve by adding "font-size: 0;" in the style
of the div that contains the image tile:


BEFORE (The small 8x8 tile is almost all white)

<div style="position: absolute; z-index: 0; left: 628px; top: 385px;
width: 8px; height: 8px;">
    <img id="OpenLayersDiv362" style="width: 8px; height: 8px; position:
relative;" class="olTileImage"
src="http://www.some-url.com/wms?LAYERS=..."/>
</div>


AFTER (The small 8x8 tile display correctly)

<div style="position: absolute; z-index: 0; left: 628px; top: 385px;
width: 8px; height: 8px; font-size: 0;">
    <img id="OpenLayersDiv362" style="width: 8px; height: 8px; position:
relative;" class="olTileImage"
src="http://www.some-url.com/wms?LAYERS=..."/>
</div>


Thanks

-- 
Gael Lafond
Programmer
Australian Institute of Marine Science (AIMS)
PMB 3
Townsville MC
QLD 4810
Ph: +61 7 4753 4207
E-Mail: g.lafond at aims.gov.au


--  
------------------------------------------------------------------------
The information contained within this transmission is for the
use of the intended recipient only and may contain confidential
and/or legally privileged material and/or material the subject
of copyright and/or personal information and/or sensitive
information that is subject to the Privacy Act 1988. Any review,
re-transmission, disclosure, dissemination or other use of, or
taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is
prohibited. If you have received this email in error please
notify the AIMS Privacy Officer on (07) 4753 4444 and delete
all copies of this transmission together with any attachments.
------------------------------------------------------------------------


More information about the Dev mailing list