Javascript 谷歌地图和iPhone
我正在为智能手机开发简单的应用程序。 除了iPhone,它在任何地方都能工作。 代码非常简单: js: 和HTML:Javascript 谷歌地图和iPhone,javascript,iphone,mobile,google-maps-api-3,Javascript,Iphone,Mobile,Google Maps Api 3,我正在为智能手机开发简单的应用程序。 除了iPhone,它在任何地方都能工作。 代码非常简单: js: 和HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" conte
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="resources/js/test.js"></script>
</head>
<body onload="initialize_map()">
<div id="map_block" style="width:100%; height:480px;" ></div>
</body>
</html>
它显示一张地图和一个用于移动地图的大导航控制器——没有什么特别的。
除了iPhone之外,它在任何地方都能工作。
在iPhone上,地图显示正确,但您无法移动它(拖动并移动),导航控制器(如果您愿意,小部件)也不会出现
我遗漏了什么?您是否尝试过激活safari设置上的调试错误(在底部)。我的意思是你在阻止代码时出错了。尝试用小高度代替480px。干杯
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="resources/js/test.js"></script>
</head>
<body onload="initialize_map()">
<div id="map_block" style="width:100%; height:480px;" ></div>
</body>
</html>