阅读背景:

如果在调整大小事件后调用,则Google Maps API fitBounds()的行为会有所不同

来源:互联网 

I'm using google maps api to show a flight path on a web site with a mobile and desktop view. The mobile view hides the containing div (display: none) if the display width is below 320px. If the user turns the phone to landscape mode, the div and thus the map becomes visible. However, if I load the page in landscape mode, the map shows another zoom level, than if the page is loaded in portrait mode (with the map not shown) and then rotated to landscape. The resize event is fired and within it I call fitBounds(). Any idea??I'm using google maps api to show a flight path




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: