I have an Openlayers 2.11 map displayed in an Iframe. It works fine in IE and Firefox. In Chrome the layers are misaligned. This is easily reproduced with the Openlayers examples. Create an aspx page like this (below). Once loaded, pan the map by dragging. It behaves as expected in IE and Firefox. In Chrome, the layer moves independently. This happens regardless of whether I set sphericalMercator=true on the layer (I have the example locally). If the example is NOT in an Iframe, then it works correctly. It is important that I can run the map in an Iframe.
任何建议都得到赞赏。
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div style="float:right;width:800px;height:600px">
<iframe runat="server" frameborder="0" src="http://openlayers.org/dev/examples/vector-features.html" width="100%" height="100%"></iframe>
</div>
</form>
</body>
</html>