我一直在使用 angular-google-maps 一段时间。到目前为止,我还没有遇到任何重大问题。但是我的一位同事最近将 angular 升级到了 1.3.8。从那时起,我在实例化 and 指令时遇到以下错误,我没有看到任何标记。这是我得到的错误。任何调试的输入或指导都会很棒。提前致谢。
这是第一个错误:
Error: this.mapCtrl.getMap is not a function
this.MarkersParentModel</MarkersParentModel.prototype.createMarkers@http://localhost/scripts/1b3f05c4.modules.js:2637:75
__bind/<@http://localhost/scripts/1b3f05c4.modules.js:2569:16
this.MarkersParentModel</MarkersParentModel.prototype.onTimeOut@http://localhost/scripts/1b3f05c4.modules.js:2612:16
__bind/<@http://localhost/scripts/1b3f05c4.modules.js:2569:16
__bind/<@http://localhost/scripts/1b3f05c4.modules.js:2234:16
IMarkerParentModel/<@http://localhost/scripts/1b3f05c4.modules.js:2290:11
timeout/timeoutId<@http://localhost/bower_components/angular/angular.js:16205:28
completeOutstandingRequest@http://localhost/bower_components/angular/angular.js:4902:7
Browser/self.defer/timeoutId<@http://localhost/bower_components/angular/angular.js:5282:7
http://localhost/bower_components/angular/angular.js
Line 11594
这是第二个错误:
Error: this.linked.ctrls[0].getMap is not a function
this.WindowsParentModel</WindowsParentModel.prototype.createChildScopesWindows@http://localhost/scripts/1b3f05c4.modules.js:2860:21
__bind/<@http://localhost/scripts/1b3f05c4.modules.js:2726:16
WindowsParentModel/<@http://localhost/scripts/1b3f05c4.modules.js:2785:18
timeout/timeoutId<@http://localhost/bower_components/angular/angular.js:16205:28
completeOutstandingRequest@http://localhost/bower_components/angular/angular.js:4902:7
Browser/self.defer/timeoutId<@http://localhost/bower_components/angular/angular.js:5282:7
http://localhost/bower_components/angular/angular.js
Line 11594
第 2860 行:
var markersScope, modelsNotDefined, _this = this;
this.isIconVisibleOnClick = true;
if (angular.isDefined(this.linked.attrs.isiconvisibleonclick)) {
this.isIconVisibleOnClick = this.linked.scope.isIconVisibleOnClick;
}
>>>> this.gMap = this.linked.ctrls[0].getMap();
markersScope = this.linked.ctrls.length > 1 && this.linked.ctrls[1] != null ? this.linked.ctrls[1].getMarkersScope() : void 0;
modelsNotDefined = angular.isUndefined(this.linked.scope.models);
if (modelsNotDefined && (markersScope === void 0 || markersScope.markerModels === void 0 && markersScope.models === void 0)) {
this.$log.info('No models to create windows from! Need direct models or models derrived from markers!');
return;
}
第 2637 行:
this.gMarkerManager = new directives.api.managers.MarkerManager(this.mapCtrl.getMap());