Skip to content

Commit 2d43915

Browse files
author
Allen Kim
committed
Version 1.15.7
1 parent 71fb16d commit 2d43915

File tree

9 files changed

+36
-22
lines changed

9 files changed

+36
-22
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngmap",
3-
"version": "1.15.6",
3+
"version": "1.15.7",
44
"main": "./build/scripts/ng-map.js",
55
"homepage": "https://github.com/allenhwkim/angularjs-google-maps",
66
"authors": [

build/docs/NgMap.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ <h5>Parameters:</h5>
265265
</dd>
266266
</dl><dl>
267267
<dt>
268-
<a href="source/NgMap.html#line95" class="name-link">
268+
<a href="source/NgMap.html#line98" class="name-link">
269269
<h4 class="name">
270270
getGeoLocation
271271
<span class="signature">(address, options)</span>
@@ -390,7 +390,7 @@ <h5>Parameters:</h5>
390390
</dd>
391391
</dl><dl>
392392
<dt>
393-
<a href="source/NgMap.html#line130" class="name-link">
393+
<a href="source/NgMap.html#line133" class="name-link">
394394
<h4 class="name">
395395
observeAndSet
396396
<span class="signature">(attrName, object)</span>
@@ -441,7 +441,7 @@ <h5>Returns:</h5>
441441
</dd>
442442
</dl><dl>
443443
<dt>
444-
<a href="source/NgMap.html#line184" class="name-link">
444+
<a href="source/NgMap.html#line187" class="name-link">
445445
<h4 class="name">
446446
setDefaultOptions
447447
<span class="signature">(options)</span>
@@ -481,7 +481,7 @@ <h5>Parameters:</h5>
481481
</dd>
482482
</dl><dl>
483483
<dt>
484-
<a href="source/NgMap.html#line159" class="name-link">
484+
<a href="source/NgMap.html#line162" class="name-link">
485485
<h4 class="name">
486486
setStyle
487487
<span class="signature">(map)</span>

build/docs/source/NgMap.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,10 @@ <h1 class="title">
252252
var deleteMap = function(mapCtrl) {
253253
var len = Object.keys(mapControllers).length - 1;
254254
var mapId = mapCtrl.map.id || len;
255-
delete mapCtrl.map;
255+
mapCtrl.map.controls.forEach(function(ctrl) {
256+
ctrl.clear();
257+
});
258+
//delete mapCtrl.map;
256259
delete mapControllers[mapId];
257260
};
258261
/**

build/docs/source/custom-control.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,8 @@ <h1 class="title">
218218
google.maps.event.addDomListener(customControlEl, eventName, events[eventName]);
219219
}
220220
mapController.addObject('customControls', customControlEl);
221-
NgMap.getMap().then(function(map) {
222-
var position = options.position;
223-
map.controls[google.maps.ControlPosition[position]].push(customControlEl);
224-
});
221+
var position = options.position;
222+
mapController.map.controls[google.maps.ControlPosition[position]].push(customControlEl);
225223
};
226224
var customControl = function(Attr2MapOptions, _$compile_, _NgMap_) {
227225
parser = Attr2MapOptions, $compile = _$compile_, NgMap = _NgMap_;

build/docs/source/drawing-manager.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ <h1 class="title">
231231
google.maps.event.addListener(drawingManager, eventName, events[eventName]);
232232
}
233233
mapController.addObject('mapDrawingManager', drawingManager);
234+
element.bind('$destroy', function() {
235+
mapController.deleteObject('mapDrawingManager', drawingManager);
236+
});
234237
}
235238
}; // return
236239
}]);

build/scripts/ng-map.debug.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,8 @@ angular.module('ngMap', []);
352352
}
353353

354354
mapController.addObject('customControls', customControlEl);
355-
NgMap.getMap().then(function(map) {
356-
var position = options.position;
357-
map.controls[google.maps.ControlPosition[position]].push(customControlEl);
358-
});
355+
var position = options.position;
356+
mapController.map.controls[google.maps.ControlPosition[position]].push(customControlEl);
359357

360358
};
361359

@@ -803,6 +801,10 @@ angular.module('ngMap', []);
803801
}
804802

805803
mapController.addObject('mapDrawingManager', drawingManager);
804+
805+
element.bind('$destroy', function() {
806+
mapController.deleteObject('mapDrawingManager', drawingManager);
807+
});
806808
}
807809
}; // return
808810
}]);
@@ -2873,7 +2875,10 @@ angular.module('ngMap', []);
28732875
var deleteMap = function(mapCtrl) {
28742876
var len = Object.keys(mapControllers).length - 1;
28752877
var mapId = mapCtrl.map.id || len;
2876-
delete mapCtrl.map;
2878+
mapCtrl.map.controls.forEach(function(ctrl) {
2879+
ctrl.clear();
2880+
});
2881+
//delete mapCtrl.map;
28772882
delete mapControllers[mapId];
28782883
};
28792884

build/scripts/ng-map.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,8 @@ angular.module('ngMap', []);
352352
}
353353

354354
mapController.addObject('customControls', customControlEl);
355-
NgMap.getMap().then(function(map) {
356-
var position = options.position;
357-
map.controls[google.maps.ControlPosition[position]].push(customControlEl);
358-
});
355+
var position = options.position;
356+
mapController.map.controls[google.maps.ControlPosition[position]].push(customControlEl);
359357

360358
};
361359

@@ -803,6 +801,10 @@ angular.module('ngMap', []);
803801
}
804802

805803
mapController.addObject('mapDrawingManager', drawingManager);
804+
805+
element.bind('$destroy', function() {
806+
mapController.deleteObject('mapDrawingManager', drawingManager);
807+
});
806808
}
807809
}; // return
808810
}]);
@@ -2871,7 +2873,10 @@ angular.module('ngMap', []);
28712873
var deleteMap = function(mapCtrl) {
28722874
var len = Object.keys(mapControllers).length - 1;
28732875
var mapId = mapCtrl.map.id || len;
2874-
delete mapCtrl.map;
2876+
mapCtrl.map.controls.forEach(function(ctrl) {
2877+
ctrl.clear();
2878+
});
2879+
//delete mapCtrl.map;
28752880
delete mapControllers[mapId];
28762881
};
28772882

build/scripts/ng-map.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngmap",
3-
"version": "1.15.6",
3+
"version": "1.15.7",
44
"main": "build/scripts/ng-map.js",
55
"dependencies": {},
66
"engines": {

0 commit comments

Comments
 (0)