|
27 | 27 | /* global document */ |
28 | 28 | (function() { |
29 | 29 | 'use strict'; |
30 | | - var parser, $timeout, $compile, NgMap; |
| 30 | + var parser, $timeout, $compile, $log, NgMap; |
31 | 31 |
|
32 | 32 | var CustomMarker = function(options) { |
33 | 33 | options = options || {}; |
|
121 | 121 | }; |
122 | 122 |
|
123 | 123 | var linkFunc = function(orgHtml, varsToWatch) { |
124 | | - //console.log('orgHtml', orgHtml, 'varsToWatch', varsToWatch); |
| 124 | + $log.debug('orgHtml', orgHtml, 'varsToWatch', varsToWatch); |
125 | 125 |
|
126 | 126 | return function(scope, element, attrs, mapController) { |
127 | 127 | mapController = mapController[0]||mapController[1]; |
|
135 | 135 | * build a custom marker element |
136 | 136 | */ |
137 | 137 | element[0].style.display = 'none'; |
138 | | - console.log("custom-marker options", options); |
| 138 | + $log.debug("custom-marker options", options); |
139 | 139 | var customMarker = new CustomMarker(options); |
140 | 140 |
|
141 | 141 | $timeout(function() { //apply contents, class, and location after it is compiled |
|
147 | 147 | var classNames = element[0].firstElementChild.className; |
148 | 148 | customMarker.addClass('custom-marker'); |
149 | 149 | customMarker.addClass(classNames); |
150 | | - console.log('customMarker', customMarker, 'classNames', classNames); |
| 150 | + $log.debug('customMarker', customMarker, 'classNames', classNames); |
151 | 151 |
|
152 | 152 | if (!(options.position instanceof google.maps.LatLng)) { |
153 | 153 | NgMap.getGeoLocation(options.position).then( |
|
158 | 158 | } |
159 | 159 | }); |
160 | 160 |
|
161 | | - console.log("custom-marker events", "events"); |
| 161 | + $log.debug("custom-marker events", "events"); |
162 | 162 | for (var eventName in events) { /* jshint ignore:line */ |
163 | 163 | google.maps.event.addDomListener( |
164 | 164 | customMarker.el, eventName, events[eventName]); |
|
178 | 178 |
|
179 | 179 |
|
180 | 180 | var customMarkerDirective = function( |
181 | | - _$timeout_, _$compile_, Attr2MapOptions, _NgMap_ |
| 181 | + _$timeout_, _$compile_, _$log_, Attr2MapOptions, _NgMap_ |
182 | 182 | ) { |
183 | 183 | parser = Attr2MapOptions; |
184 | 184 | $timeout = _$timeout_; |
185 | 185 | $compile = _$compile_; |
| 186 | + $log = _$log_; |
186 | 187 | NgMap = _NgMap_; |
187 | 188 |
|
188 | 189 | return { |
|
209 | 210 | }; // return |
210 | 211 | };// function |
211 | 212 | customMarkerDirective.$inject = |
212 | | - ['$timeout', '$compile', 'Attr2MapOptions', 'NgMap']; |
| 213 | + ['$timeout', '$compile', '$log', 'Attr2MapOptions', 'NgMap']; |
213 | 214 |
|
214 | 215 | angular.module('ngMap').directive('customMarker', customMarkerDirective); |
215 | 216 | })(); |
0 commit comments