问题
I have an app using appmobi/xdk/appframework when I put in the package
It disables the scrollinf of the page vertically on the iPhone. However, it also disables the scrolling of the Google map on the page. Any ideas on how to re-enable the map scrolling?
回答1:
Just add scrolling="no" in your panel and data-footer="none" if u want more space for map
<div id="main" class="panel" selected="true" scrolling="no" data-footer="none">
回答2:
<!--If your are using the appmobi 3.4.0 platform -->
<div id="#pagetitle" title="Yourtitle" class="panel" scrolling="no">
<div id="map-google" style="overflow:visible;">
</div>
</div>
<!--If your are using the appmobi/intel XDK 4.0 platform-->
<div id="#pagetitle" title="Yourtitle" class="panel" style="overflow:hidden;">
<div id="map-google" style="overflow:visible;">
</div>
</div>
回答3:
the key is to add style="overflow:hidden"
on your panel.
Here is sample code with appframework + google maps: http://jsbin.com/UKaQetO/1/edit
works on iphone,android and windows phone.
来源:https://stackoverflow.com/questions/19486222/disable-page-scroll-but-allow-google-map-scroll