@@ -12,27 +12,27 @@ angular.module('whatamiApp')
12
12
// Service logic
13
13
// ...
14
14
function calculateBoundaries ( positions , centerPosition ) {
15
- var maxX = centerPosition . longitude + 5 ;
16
- var minX = centerPosition . longitude - 5 ;
17
- var minY = centerPosition . latitude + 5 ;
18
- var maxY = centerPosition . latitude - 5 ;
15
+ var maxLongitude = centerPosition . longitude + 5 ;
16
+ var minLongitude = centerPosition . longitude - 5 ;
17
+ var minLatitude = centerPosition . latitude - 5 ;
18
+ var maxLatitude = centerPosition . latitude + 5 ;
19
19
20
20
positions . forEach ( function ( position ) {
21
- while ( position . longitude >= maxX || position . longitude <= minX ) {
22
- maxX = maxX + 5 ;
23
- minX = minY - 5 ;
21
+ while ( position . longitude >= maxLongitude || position . longitude <= minLongitude ) {
22
+ maxLongitude = maxLongitude + 5 ;
23
+ minLongitude = minLongitude - 5 ;
24
24
}
25
- while ( position . latitude >= maxY || position . latitude <= minY ) {
26
- maxY = maxY + 5 ;
27
- minY = minY - 5 ;
25
+ while ( position . latitude >= maxLatitude || position . latitude <= minLatitude ) {
26
+ maxLatitude = maxLatitude + 5 ;
27
+ minLatitude = minLatitude - 5 ;
28
28
}
29
29
} ) ;
30
30
31
31
return {
32
- maxX : maxX ,
33
- minX : minX ,
34
- maxY : maxY ,
35
- minY : minY
32
+ maxX : maxLongitude ,
33
+ minX : minLongitude ,
34
+ maxY : maxLatitude ,
35
+ minY : minLatitude
36
36
} ;
37
37
38
38
}
@@ -68,7 +68,6 @@ angular.module('whatamiApp')
68
68
69
69
var boundaries = calculateBoundaries ( positions , centerPosition ) ;
70
70
71
- console . log ( boundaries ) ;
72
71
positions . forEach ( function ( position ) {
73
72
domainValues . push ( {
74
73
cx : calculateCx ( position , boundaries ) ,
0 commit comments