[OpenLayers-Dev] Examples behave different in IE due to Quirks
Mode
Christopher Schmidt
crschmidt at metacarta.com
Wed Jun 11 07:08:53 EDT 2008
On Wed, Jun 11, 2008 at 11:05:01AM +0200, Andreas Hocevar wrote:
> Hi,
>
> I just encountered a strange viewing experience of many of the
> examples. Try e.g. http://www.openlayers.org/dev/examples/example.html
> in IE and compare with other browsers: IE zooms to zoom level 0, other
> browsers to zoom level 0.
>
> After some investigation, i saw that the map viewport is 510x254px in
> IE, and 512x256px in other browsers. Now if you add a DOCTYPE to the
> html that forces the browser into standards compliant mode (e.g.
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">), the viewport size
> will be 512x256px in all browsers.
>
> So the reason why this causes different zoom levels is that the default
> for Map.maxResolution is 1.40625, which fits 360 deg into 256 px. If we
> have less px, a map of the world won't fit.
>
> Should we change the examples to use standards compliant mode?
In general, I haven't tested OpenLayers in anything other than quirks
mode, so I'm not sure that all things -- like vector rendering and the
like -- work correctly. If they do, then I'm fine with that.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Dev
mailing list