【发布时间】:2010-12-25 17:42:48
【问题描述】:
我正在开发通过 Google Maps API 嵌入 Google Maps 的移动网站。我已经能够阻止某些类型的行为,但是当我在 iPhone 上向下滚动页面时,我无法找到阻止地图滚动的好方法。这是我正在使用的代码:
<script>
function initialize() {
var mapElem = document.getElementById("map"),
myOptions = {
zoom: 13,
center: new google.maps.LatLng(41.8965,-84.063),
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL,
position: google.maps.ControlPosition.TOP_RIGHT
},
streetViewControl: false,
mapTypeControl: false,
disableDoubleClickZoom: true,
scrollwheel: false,
backgroundColor: '#f2efe9',
mapTypeId: google.maps.MapTypeId.ROADMAP
},
map = new google.maps.Map(mapElem, myOptions);
}
</script>
<script src='http://maps.google.com/maps/api/js?sensor=false&callback=initialize'></script>
提前致谢。
【问题讨论】:
标签: javascript google-maps mobile