iPad模拟器WebView / Google Maps API问题 [英] iPad Simulator WebView/Google Maps API Issue

查看:111
本文介绍了iPad模拟器WebView / Google Maps API问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近才将XCode更新为3.2.2,并开始使用iPad模拟器。



我遇到了WebView问题。我正在使用它通过Google Maps API实现加载网址。地图加载和正确显示,但是当我尝试单击并拖动它以平移地图而不是被平移的地图时,整个webview会垂直滚动,显示深灰色背景。当我释放它时,它会弹回原位。



另外,当我按住选项键捏住地图时,它不响应。如果我加载map.google.com页面,地图平铺很好,而且是响应式的,但不是我的。这里没有特殊的代码,只是通常的NSUrlRequest。它在iPhone模拟器中工作正常,但不是iPad模拟器。用户交互已启用也被选中。



任何想法为什么发生这种情况? 这个问题似乎已经在Xcode 3.2.3中解决了,但任何使用3.2.2的用户都可能通过添加这个HTML5元标记来解决它:

 < meta name =viewportcontent =initial-scale = 1.0,user-scalable = no/> 

添加到HTML的头部。


I've only recently updated XCode to 3.2.2 and started to play with the iPad simulator.

I am having an issue with a WebView. I am using it to load a url with a Google Maps API implementation. The map loads and displays properly but when I try and click and drag on it to pan the map around instead of the map being panned the whole webview is scrolled vertically, revealing the dark grey background. When I release it it bounces back into place.

Also when I hold the option key down to pinch the map it does not respond. If I load the map.google.com page the map pans just fine and is responsive, but not my one. No special code here, just the usual NSUrlRequest. It works fine in the iPhone simulator, but not the iPad simulator. User Interaction Enabled is also checked.

Any thoughts on why this is happening?

解决方案

This issue appears to have been fixed in Xcode 3.2.3 but anyone using 3.2.2 who experiences this issue may also be able to solve it by adding this HTML5 meta tag:

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

to the head section of their HTML.

这篇关于iPad模拟器WebView / Google Maps API问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆