升级到角度1.3.8后,标记和Windows(Angular google maps)无法正常工作

时间:2015-01-08 13:35:36

标签: angularjs google-maps google-maps-markers angular-google-maps

我一直在使用angular-google-maps。到目前为止我还没有遇到任何重大问题。但我的一位同事最近将角度提升至1.3.8。从那时起,我在实例化和指令时遇到以下错误,我没有看到任何标记。这是我得到的错误。任何输入或调试方向都会很棒。提前致谢。

这是第一个错误:

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());

0 个答案:

没有答案