【发布时间】:2015-05-26 22:00:41
【问题描述】:
我有谷歌地图标记,可以在我的应用中正确加载,但对触摸没有反应(例如,没有显示标签)。
我将问题推断为离子束中的某些东西。
在this example 的顶部,您将看到两个引用:
<!--With the reference below, map markers respond to touch on mobile device (iPhone)-->
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular.min.js"></script>
<!--With the reference below, map markers DO NOT respond to touch on mobile device (iPhone)-->
<script src="http://code.ionicframework.com/1.0.0-rc.1/js/ionic.bundle.min.js"></script>
如果我只引用 angularjs,那么我可以单击标记并获取标题。
如果我引用 ionicbundle(其中包含 angularjs),则在我的移动设备 (iPhone) 上单击标记不会执行任何操作。
它仍然适用于浏览器测试。
注意:如果您决定测试离子束,则需要更改此行:
angular.module('app', ['uiGmapgoogle-maps'])
到这里:
angular.module('app', ['ionic','uiGmapgoogle-maps'])
为了让离子框架正确加载。
另外,仅供参考,然后离子束引用 1.3.6 而不是 1.3.3。您可以将 anguarjs 引用更改为 1.3.6,它仍然可以工作。
【问题讨论】:
标签: javascript html angularjs google-maps ionic-framework