[OpenLayers-Dev] Examples behave different in IE due to Quirks Mode
andreas.hocevar at gmail.com
Wed Jun 11 05:05:01 EDT 2008
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?
More information about the Dev