|
|
@@ -394,7 +394,6 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-
|
|
|
var computeDateFTTH = function() {
|
|
|
if(!$scope.results.ftth) {return;}
|
|
|
|
|
|
@@ -425,7 +424,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
|
|
|
map.on('dblclick', function(e) {
|
|
|
var p = e.latlng;
|
|
|
- console.log('click', e.latlng); // e is an event object (MouseEvent in this case)
|
|
|
+ //console.log('click', e.latlng); // e is an event object (MouseEvent in this case)
|
|
|
$scope.geoCode = {
|
|
|
x: p.lng,
|
|
|
y: p.lat
|
|
|
@@ -634,7 +633,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
},
|
|
|
valueField: 'suggestions',
|
|
|
preProcess: function (data) {
|
|
|
- console.log('suggestions', data && data.suggestions);
|
|
|
+ //console.log('suggestions', data && data.suggestions);
|
|
|
|
|
|
$scope.suggestions = data.suggestions;
|
|
|
$scope.magicKey = null;
|
|
|
@@ -644,9 +643,11 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
});
|
|
|
|
|
|
$scope.getGeoCode = function(address, magicKey, callback) {
|
|
|
+ //console.log('address, magicKey', address, magicKey);
|
|
|
+
|
|
|
getGeoCodeInProgress = true;
|
|
|
var url = findURL + "&text=" + address + ((magicKey) ? ("&magicKey=" + magicKey) : ', Basse-Normandie, France');
|
|
|
- console.log('url', url);
|
|
|
+ //console.log('url', url);
|
|
|
$.get(
|
|
|
url,
|
|
|
function(data, status) {
|
|
|
@@ -672,7 +673,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
};
|
|
|
});
|
|
|
|
|
|
- console.time('FTTH data');
|
|
|
+ //console.time('FTTH data');
|
|
|
$http({method: 'POST', url: 'data/FTTH_zapm_partielle.json'}).success(function(data) {
|
|
|
var style = {
|
|
|
color : $scope.colors.ftth,
|
|
|
@@ -687,15 +688,15 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
};
|
|
|
|
|
|
parseData('ftth', data, style, properties);
|
|
|
- console.timeEnd('FTTH data');
|
|
|
- console.debug('Data for FTTH are ready', data);
|
|
|
+ //console.timeEnd('FTTH data');
|
|
|
+ //console.debug('Data for FTTH are ready', data);
|
|
|
if($scope.data.mimo && $scope.data.adsl && $scope.data.ftth) {
|
|
|
$scope.loaded = true;
|
|
|
}
|
|
|
$scope.$evalAsync();
|
|
|
});
|
|
|
|
|
|
- console.time('ADSL data');
|
|
|
+ //console.time('ADSL data');
|
|
|
$http({method: 'POST', url: 'data/TEL_FT_ADSL.json'}).success(function(data) {
|
|
|
var style = {
|
|
|
color : $scope.colors.adsl,
|
|
|
@@ -709,15 +710,15 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
};
|
|
|
|
|
|
parseData('adsl', data, style, properties);
|
|
|
- console.timeEnd('ADSL data');
|
|
|
- console.debug('Data for ADSL are ready', data);
|
|
|
+ //console.timeEnd('ADSL data');
|
|
|
+ //console.debug('Data for ADSL are ready', data);
|
|
|
if($scope.data.mimo && $scope.data.adsl && $scope.data.ftth) {
|
|
|
$scope.loaded = true;
|
|
|
}
|
|
|
$scope.$evalAsync();
|
|
|
});
|
|
|
|
|
|
- console.time('MiMo data');
|
|
|
+ //console.time('MiMo data');
|
|
|
$http({method: 'POST', url: 'data/Couverture_mimo.json'}).success(function(data) {
|
|
|
var style = {
|
|
|
color : $scope.colors.mimo,
|
|
|
@@ -731,8 +732,8 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
};
|
|
|
|
|
|
parseData('mimo', data, style, properties);
|
|
|
- console.timeEnd('MiMo data');
|
|
|
- console.debug('Data for MIMO are ready', data);
|
|
|
+ //console.timeEnd('MiMo data');
|
|
|
+ //console.debug('Data for MIMO are ready', data);
|
|
|
if($scope.data.mimo && $scope.data.adsl && $scope.data.ftth) {
|
|
|
$scope.loaded = true;
|
|
|
}
|
|
|
@@ -887,17 +888,17 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
}
|
|
|
|
|
|
if(adresse)
|
|
|
- console.log('Reverse', data, '=>', data && data.address);
|
|
|
+ //console.log('Reverse', data, '=>', data && data.address);
|
|
|
callback(adresse, data.address);
|
|
|
$scope.$evalAsync();
|
|
|
});
|
|
|
};
|
|
|
|
|
|
$scope.initPopup = function() {
|
|
|
- console.log('initPopup', $scope.geoCode);
|
|
|
+ //console.log('initPopup', $scope.geoCode);
|
|
|
$scope.postForm = null;
|
|
|
reverseLocation($scope.geoCode, null, function(string, address) {
|
|
|
- console.log('add', address);
|
|
|
+ //console.log('add', address);
|
|
|
$scope.result = {eligibilite: {}};
|
|
|
|
|
|
// Debug
|
|
|
@@ -921,7 +922,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
|
|
|
$scope.postFormEl = function() {
|
|
|
$scope.postForm = {inProgress: true};
|
|
|
- console.log('postForm', $scope.result.eligibilite);
|
|
|
+ //console.log('postForm', $scope.result.eligibilite);
|
|
|
$scope.$evalAsync();
|
|
|
|
|
|
function mysql_real_escape_string (str) {
|
|
|
@@ -960,7 +961,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
|
|
|
var query = "INSERT INTO `eligibilite`.`demandes` (" + keys.substring(0, keys.length -2) + ") VALUES (" + values.substring(0, values.length -2) + ");";
|
|
|
|
|
|
- console.log('query', query);
|
|
|
+ //console.log('query', query);
|
|
|
|
|
|
$.ajax({
|
|
|
method : "POST",
|
|
|
@@ -1035,7 +1036,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
body += '<td>' + res2 + '</td>';
|
|
|
body += '</tr>';
|
|
|
|
|
|
- console.log('$scope.result', $scope.result);
|
|
|
+ //console.log('$scope.result', $scope.result);
|
|
|
|
|
|
body += '</table></div><br>';
|
|
|
|
|
|
@@ -1114,7 +1115,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
|
|
|
currentMarker.on('dragend', function(event) {
|
|
|
var p = currentMarker.getLatLng();
|
|
|
- console.log('dragend', p);
|
|
|
+ //console.log('dragend', p);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1126,7 +1127,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
reverseLocation($scope.geoCode, null, function(address) {
|
|
|
$scope.address = address;
|
|
|
ariaz(address, function(result) {
|
|
|
- console.log('ariaz', result);
|
|
|
+ //console.log('ariaz', result);
|
|
|
});
|
|
|
getResults();
|
|
|
});
|
|
|
@@ -1200,7 +1201,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
|
|
|
$mdToast.show(toast);
|
|
|
}
|
|
|
- console.log('Addresses found for', $scope.address, '=>', data, '=> Geocode:', $scope.geoCode);
|
|
|
+ //console.log('Addresses found for', $scope.address, '=>', data, '=> Geocode:', $scope.geoCode);
|
|
|
|
|
|
if($scope.geoCode) {
|
|
|
addCurrentMarker();
|
|
|
@@ -1213,7 +1214,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
|
|
|
$scope.mapType = 'Carte';
|
|
|
$scope.changeMap = function(value) {
|
|
|
- console.log('Goto', value);
|
|
|
+ //console.log('Goto', value);
|
|
|
map.removeLayer(cLayer);
|
|
|
cLayer = L.tileLayer(maps[value], {
|
|
|
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
|