English 中文(简体)
露天者特征与 Chrome一角展示的地图一致
原标题:Openlayers feature alignment with map displayed in an iframe in Chrome

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>
问题回答

问题在此阐述:

http://code.google.com/p/ala-zencience/issues/detail?id=6"rel=“nofollow”http://code.google.com/p/ala-zencience/issues/detail?id=6

The solution is to have your own version of OpenLayers iii some minor changes (jQuery is required): Search for:

renderers:[ SVG , VML , Canvas ]

修改:

renderers:(jQuery.browser.webkit?[ Canvas , VML ]:[ SVG , Canvas , VML ])

(如果将开放式律师的法典降至最低程度,这是符合多项指示的很长一段时期的一部分)


如果你使用露天图像和风格,而且你想保持这些形象,你也应改变:

<if OpenLayers 2.11:

return(function(){return l;})

iii

return(function(){return "http://www.openlayers.org/api/";})

<if OpenLayers 2.10:

var scriptLocation;

iii

var scriptLocation = "http://www.openlayers.org/api/";




相关问题
Redirect to cache URL in Chrome browser

self.location = cache: + self.location I want to redirect from "[URL]" to "cache:[URL]". I just want this code to work in Chrome browser.

我如何更新/重载 Chrome延?

I m在4号 Chrome(目前为4.0.249.0)中开发一个延伸点,显示用户在地位酒吧中的形象。 Ive设计了一个供用户使用的备选办法网页......

Setting Opacity in CSS For Chrome

I ve tried the following: (this is actually for fancybox, as the overlay does not show in chrome/safari: $("#fancy_overlay").css({<br /> background-color : opts....

Chrome Blocking Javascript, Google Wave, Google Gadgets

Project: Developing a gadget template for Google Wave which will allow my Flash movies to interact with the Wave api. I had to adapt the existing Flex application so that it would work with ...

image height using jquery in chrome problem

$( img ).height() returns 0 in chrome, but it returns the actual height in IE and firefox. Whats the actual method to get the height of the image in chrome?

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

Table cells bad rendering with Google Chrome/Webkit

On the following code, COL1A and COL3A are not 50% height with Chrome or Webkit. It works fine with IE7 and Firefox. <table border="1"> <tr> <td height="100%">COL 1A</td>...

热门标签