我在 jQuery Mobile 应用程序中嵌入了谷歌地图。在 iPhone 上查看地图并单击 infoWindows 时出现以下行为:
- 如果单击需要地图向左平移的 infoWindow,则 infoWindow 的右侧会从屏幕的右侧脱落。
- 单击需要地图向右平移的信息窗口不会出现同样的问题。
所有 infoWindows 的大小都正确,但地图根本没有平移到正确的位置。我正在使用以下代码来放置地图:
<style type="text/css">
.page-map, .ui-content, #map_canvas { width: 100%; height: 100%; padding: 0; }
#map_canvas img{max-width:none};
.content-primary, #map_canvas { height: 100%; min-height: 100%; }
</style>
<div data-role="page" data-theme="b" id="mappage" class="page-map" style="width:100%; height:100%;">
<div data-role="content" class="fullHeight">
<div id="map_canvas"></div>
</div>
</div>
当单击导致地图向左平移的标记时,我需要弄清楚如何让 infoWindows 正确平移。