|
376 | 376 | content: content,
|
377 | 377 | position: angular.isObject(gMarker) ? gMarker.getPosition() : new google.maps.LatLng(scope.coords.latitude, scope.coords.longitude)
|
378 | 378 | });
|
379 |
| - } |
| 379 | + }, |
| 380 | + defaultDelay: 50 |
380 | 381 | };
|
381 | 382 | });
|
382 | 383 |
|
|
883 | 884 | var self,
|
884 | 885 | _this = this;
|
885 | 886 | self = this;
|
| 887 | + this.scope = scope; |
| 888 | + this.element = element; |
886 | 889 | if (this.validateScope(scope)) {
|
887 | 890 | return;
|
888 | 891 | }
|
|
1001 | 1004 | this.onDestroy = __bind(this.onDestroy, this);
|
1002 | 1005 | this.onWatch = __bind(this.onWatch, this);
|
1003 | 1006 | this.validateScope = __bind(this.validateScope, this);
|
1004 |
| - var opts, self, |
| 1007 | + var self, |
1005 | 1008 | _this = this;
|
1006 | 1009 | MarkerParentModel.__super__.constructor.call(this, scope, element, attrs, mapCtrl, $timeout);
|
1007 | 1010 | self = this;
|
1008 |
| - opts = this.createMarkerOptions(scope.coords, scope.icon, scope.options, mapCtrl.getMap()); |
1009 |
| - this.gMarker = new google.maps.Marker(opts); |
1010 |
| - element.data('instance', this.gMarker); |
1011 |
| - this.scope = scope; |
1012 |
| - google.maps.event.addListener(this.gMarker, 'click', function() { |
1013 |
| - if (_this.doClick && (scope.click != null)) { |
1014 |
| - return $timeout(function() { |
1015 |
| - return _this.scope.click(); |
1016 |
| - }); |
1017 |
| - } |
1018 |
| - }); |
1019 |
| - this.$log.info(this); |
| 1011 | + $timeout(function() { |
| 1012 | + var opts; |
| 1013 | + opts = _this.createMarkerOptions(_this.scope.coords, _this.scope.icon, _this.scope.options, _this.mapCtrl.getMap()); |
| 1014 | + _this.gMarker = new google.maps.Marker(opts); |
| 1015 | + _this.element.data('instance', _this.gMarker); |
| 1016 | + google.maps.event.addListener(_this.gMarker, 'click', function() { |
| 1017 | + if (_this.doClick && (scope.click != null)) { |
| 1018 | + return $timeout(function() { |
| 1019 | + return _this.scope.click(); |
| 1020 | + }); |
| 1021 | + } |
| 1022 | + }); |
| 1023 | + return _this.$log.info(_this); |
| 1024 | + }, directives.api.utils.GmapUtil.defaultDelay); |
1020 | 1025 | }
|
1021 | 1026 |
|
1022 | 1027 | MarkerParentModel.prototype.validateScope = function(scope) {
|
|
1096 | 1101 | this.gMarkerManager = void 0;
|
1097 | 1102 | this.scope = scope;
|
1098 | 1103 | this.bigGulp = directives.api.utils.AsyncProcessor;
|
| 1104 | + this.$timeout = $timeout; |
1099 | 1105 | this.$log.info(this);
|
1100 | 1106 | }
|
1101 | 1107 |
|
|
1507 | 1513 | };
|
1508 | 1514 | }
|
1509 | 1515 |
|
1510 |
| - IMarker.prototype.controller = { |
1511 |
| - controller: [ |
1512 |
| - '$scope', '$element', function($scope, $element) { |
1513 |
| - throw new Exception("Not Implemented!!"); |
1514 |
| - } |
1515 |
| - ] |
1516 |
| - }; |
| 1516 | + IMarker.prototype.controller = [ |
| 1517 | + '$scope', '$element', function($scope, $element) { |
| 1518 | + throw new Exception("Not Implemented!!"); |
| 1519 | + } |
| 1520 | + ]; |
1517 | 1521 |
|
1518 | 1522 | IMarker.prototype.link = function(scope, element, attrs, ctrl) {
|
1519 | 1523 | throw new Exception("Not implemented!!");
|
|
1612 | 1616 | return scope.$on("$destroy", function() {
|
1613 | 1617 | return label.destroy();
|
1614 | 1618 | });
|
1615 |
| - }, 50); |
| 1619 | + }, directives.api.utils.GmapUtil.defaultDelay + 25); |
1616 | 1620 | };
|
1617 | 1621 |
|
1618 | 1622 | return Label;
|
@@ -1762,7 +1766,7 @@ not 1:1 in this setting.
|
1762 | 1766 | return scope.$on("$destroy", function() {
|
1763 | 1767 | return window.destroy();
|
1764 | 1768 | });
|
1765 |
| - }, 50); |
| 1769 | + }, directives.api.utils.GmapUtil.defaultDelay + 25); |
1766 | 1770 | };
|
1767 | 1771 |
|
1768 | 1772 | return Window;
|
|
0 commit comments