作者:bls6653474 | 来源:互联网 | 2023-08-13 15:29
我为我的应用程序使用angularjs和node,我想在我的应用程序中集成谷歌地图.我使用这套指令http://angular-ui.github.io/angular-google
我为我的应用程序使用angularjs和node,我想在我的应用程序中集成谷歌地图.
我使用这套指令http://angular-ui.github.io/angular-google-maps/#!/,
出现的问题是:
Uncaught Error: [$injector:modulerr] h ttp://errors.angularjs.org/1.6.2/$injector/modulerr?p0=VisualiseATM&p1=Err… at%20Mc%20(http%3A%2F%2Flocalhost%3A3000%2Flib%2Fangular.min.js%3A21%3A332)
at angular.min.js:6
at angular.min.js:41
at q (angular.min.js:7)
at g (angular.min.js:40)
at db (angular.min.js:45)
at c (angular.min.js:21)
at Mc (angular.min.js:21)
at qe (angular.min.js:20)
at angular.min.js:331
at HTMLDocument.b (angular.min.js:37)
具体来说,它的问题是:
Module ‘uiGmapgoogle-maps’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
这是我的角度代码:
var app = angular.module("VisualiseATM", [ 'uiGmapgoogle-maps',
'ui.router'
, 'controllers'
, 'ngCOOKIEs'
, ]);
app.config(function(uiGmapGoogleMapApiProvider) {
uiGmapGoogleMapApiProvider.configure({
key: 'MY_API_KEY',
v: '3.20', //defaults to latest 3.X anyhow
libraries: 'weather,geometry,visualization'
});
})
app.config(['uiGmapGoogleMapApiProvider', function(GoogleMapApiProviders) {
GoogleMapApiProviders.configure({
china: true
});
}]
);
我在互联网上找到了这个,但我不确定如何在我的应用程序中使用它.
https://github.com/angular-ui/angular-google-maps/issues/1489
我知道我必须使用这个角度简单记录器,但不知道如何将它与我的代码集成.
我希望你能给我一个答案.非常感谢!
解决方法:
不再维护Angular-Google-Maps
而是使用AngularJS-Google-Maps
DEMO on PLNKR
或使用Angular-Google-Maps旧版本2.1.6.它不需要angular-simple-logger:
Angular Google Maps
DEMO on PLNKR
Angular-Google-Maps
Project No longer actively maintained
With angular 2 and other competing projects we have decided to announce that this project is no longer activley maintained. If someone desires to take over the project please contact any of the admins.
As a warning this project is not activley watched by the admins and is checked [from time to time] to fix any major issues. Therefore if something is major, contact someone directly via mentioning a users name/alias (will notify the user/admin).
Alternatives:
07005