|
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 | }
|
|
1007 | 1010 | self = this;
|
1008 | 1011 | $timeout(function() {
|
1009 | 1012 | var opts;
|
1010 |
| - opts = _this.createMarkerOptions(scope.coords, scope.icon, scope.options, mapCtrl.getMap()); |
| 1013 | + opts = _this.createMarkerOptions(_this.scope.coords, _this.scope.icon, _this.scope.options, _this.mapCtrl.getMap()); |
1011 | 1014 | _this.gMarker = new google.maps.Marker(opts);
|
1012 |
| - element.data('instance', _this.gMarker); |
1013 |
| - _this.scope = scope; |
| 1015 | + _this.element.data('instance', _this.gMarker); |
1014 | 1016 | google.maps.event.addListener(_this.gMarker, 'click', function() {
|
1015 | 1017 | if (_this.doClick && (scope.click != null)) {
|
1016 | 1018 | return $timeout(function() {
|
|
1019 | 1021 | }
|
1020 | 1022 | });
|
1021 | 1023 | return _this.$log.info(_this);
|
1022 |
| - }); |
| 1024 | + }, directives.api.utils.GmapUtil.defaultDelay); |
1023 | 1025 | }
|
1024 | 1026 |
|
1025 | 1027 | MarkerParentModel.prototype.validateScope = function(scope) {
|
|
1099 | 1101 | this.gMarkerManager = void 0;
|
1100 | 1102 | this.scope = scope;
|
1101 | 1103 | this.bigGulp = directives.api.utils.AsyncProcessor;
|
| 1104 | + this.$timeout = $timeout; |
1102 | 1105 | this.$log.info(this);
|
1103 | 1106 | }
|
1104 | 1107 |
|
|
1613 | 1616 | return scope.$on("$destroy", function() {
|
1614 | 1617 | return label.destroy();
|
1615 | 1618 | });
|
1616 |
| - }, 50); |
| 1619 | + }, directives.api.utils.GmapUtil.defaultDelay + 25); |
1617 | 1620 | };
|
1618 | 1621 |
|
1619 | 1622 | return Label;
|
@@ -1763,7 +1766,7 @@ not 1:1 in this setting.
|
1763 | 1766 | return scope.$on("$destroy", function() {
|
1764 | 1767 | return window.destroy();
|
1765 | 1768 | });
|
1766 |
| - }, 50); |
| 1769 | + }, directives.api.utils.GmapUtil.defaultDelay + 25); |
1767 | 1770 | };
|
1768 | 1771 |
|
1769 | 1772 | return Window;
|
|
0 commit comments