angularjs – Angular-google-maps搜索框
发布时间:2020-12-17 07:08:48 所属栏目:安全 来源:网络整理
导读:我有这个结构: myFolder myApp.coffee index.html searchbox.tpl.html 在myApp设置中: $scope.searchbox = {template: "searchbox.tpl.html"} 我正在使用这个example,但我得到了TypeError:无法读取未定义的属性’SearchBox’,可能是什么? 解决方法 您可
我有这个结构:
> myFolder > myApp.coffee 在myApp设置中: $scope.searchbox = {template: "searchbox.tpl.html"} 我正在使用这个example,但我得到了TypeError:无法读取未定义的属性’SearchBox’,可能是什么? 解决方法
您可以通过两种方式使用angular-google-maps:
1)在angular-google-maps之前加入API. <script src='//maps.googleapis.com/maps/api/js?libraries=places&sensor=false&language=pt&v=3.17'></script> ^ see? there 2)使用.config(推荐). angular.module('myApp').config(['uiGmapGoogleMapApiProvider',function(uiGmapGoogleMapApiProvider) { uiGmapGoogleMapApiProvider.configure({ // key: 'your api key',v: '3.20',//defaults to latest 3.X anyhow libraries: 'places,geometry,visualization' // <--- see? there }); }]); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |