'
+ '
'+b.name+'
'
+ '
BUID:
'
@@ -309,17 +315,17 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
infowindow.open(GMapService.gmap, this);
var self = this;
$scope.$apply(function () {
- $scope.anyService.selectedBuilding = self.building;
+ $scope.anyService.setBuilding(self.building)
});
});
}
- console.log("Loaded " + $scope.myBuildings.length + " buildings!")
+ LOG.D("Loaded spaces: " + $scope.myBuildings.length)
- // using the latest building form localStorage
+ // using the latest building from localStorage
if (localStoredBuildingIndex >= 0) {
- $scope.anyService.selectedBuilding = $scope.myBuildings[localStoredBuildingIndex];
+ $scope.anyService.setBuilding($scope.myBuildings[localStoredBuildingIndex]);
} else if ($scope.myBuildings[0]) {
- $scope.anyService.selectedBuilding = $scope.myBuildings[0];
+ $scope.anyService.setBuilding($scope.myBuildings[0]);
}
// _suc('Successfully fetched buildings.');
@@ -354,13 +360,11 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
if (building.name && building.description && building.is_published && building.url && building.address && building.space_type) {
var promise = $scope.anyAPI.addBuilding(building);
promise.then(
- function (resp) {
- // on success
+ function (resp) { // on success
var data = resp.data;
- console.log("new buid: " + data.buid);
building.buid = data.buid;
- if (building.is_published === 'true' || building.is_published == true) {
+ if (building.is_published === 'true' || building.is_published === true) {
building.is_published = true;
} else {
building.is_published = false;
@@ -368,10 +372,18 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
// insert the newly created building inside the loadedBuildings
$scope.myBuildings.push(building);
-
- $scope.anyService.selectedBuilding = $scope.myBuildings[$scope.myBuildings.length - 1];
+ $scope.anyService.setBuilding($scope.myBuildings[$scope.myBuildings.length - 1]);
$scope.myMarkers[id].marker.setDraggable(false);
+ if (building.space_type === "vessel") {
+ var icon_vessel= {
+ url: IMG_VESSEL_ARCHITECT,
+ scaledSize: new google.maps.Size(50, 50), // scaled size
+ origin: new google.maps.Point(0,0), // origin
+ anchor: new google.maps.Point(0, 0) // anchor
+ };
+ $scope.myMarkers[id].marker.icon = icon_vessel;
+ }
$scope.myBuildingsHashT[building.buid] = {
marker: $scope.myMarkers[id].marker,
@@ -383,8 +395,7 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
$scope.myMarkers[id].infowindow.close();
}
- _suc($scope, "Building added successfully.");
-
+ _info_autohide($scope, "Added " + building.space_type);
},
function (resp) {
ShowError($scope, resp);
@@ -404,9 +415,12 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
promise.then(
function (resp) { // on success
var data = resp.data;
- console.log("building deleted: ", b);
- // delete the building from the loadedBuildings
- $scope.myBuildingsHashT[b.buid].marker.setMap(null);
+ // BUG does not disappear. They must be keeping references to the space in multiple places..
+ if($scope.myBuildingsHashT[b.buid].marker) {
+ $scope.myBuildingsHashT[b.buid].marker.setMap(null);
+ delete $scope.myBuildingsHashT[b.buid].marker;
+ }
+
delete $scope.myBuildingsHashT[b.buid];
var bs = $scope.myBuildings;
var sz = bs.length;
@@ -416,25 +430,22 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
break;
}
}
+
// update the selected building
- if ($scope.myBuildings && $scope.myBuildings.length > 0) {
- $scope.anyService.selectedBuilding = $scope.myBuildings[0];
+ if ($scope.myBuildings && $scope.myBuildings.length > 0) { // TODO:PV fix the logic
+ // $scope.anyService.setBuilding($scope.anyService.prevBuilding);
+ $scope.anyService.selectedBuilding = undefined;
}
$scope.setCrudTabSelected(1);
- _suc($scope, "Successfully deleted indoor space.");
+ _info_autohide($scope, "Deleted " + b.space_type + ". Please refresh.");
},
function (resp) {
ShowError($scope, resp,
- "Something went wrong." +"" +
- "It's likely that everything related to the indoor space is deleted " +
- "but please refresh to make sure or try again.", true)
+ "Something's wrong. Please refresh. Info:", true)
}
);
-
};
-
-
$scope.deleteRadiomaps = function () {
var jsonReq = {"buid": $scope.anyService.getBuildingId(), "floor": $scope.anyService.getFloorNumber()};
jsonReq.username = $scope.creds.username;
@@ -687,9 +698,8 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
$("#draggable-building").draggable({
helper: 'clone',
- start: function() {
- // BUG: setting the size of the draggable building.
- // The first time it does not work for some reason.
+ create: function(event, ui) {
+ // Resize as image is larger than the html element
$(this).height(50).width(50);
},
stop: function (e) {
@@ -700,7 +710,6 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
});
$scope.placeMarker = function (location) {
-
var prevMarker = $scope.myMarkers[$scope.myMarkerId - 1];
if (prevMarker && prevMarker.marker && prevMarker.marker.getMap() && prevMarker.marker.getDraggable()) {
@@ -721,11 +730,10 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
var marker = new google.maps.Marker({
position: location,
map: GMapService.gmap,
- icon: icon_building,
+ icon: icon_building, // assuming a building
draggable: true
});
-
var infowindow = new google.maps.InfoWindow({
content: '-',
maxWidth: 500
@@ -743,6 +751,7 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
bucode: "",
type: undefined
};
+
$scope.myMarkers[marker.myId].marker = marker;
$scope.myMarkers[marker.myId].infowindow = infowindow;
$scope.myMarkerId++;
@@ -750,21 +759,21 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
var htmlContent = '
';
var htmlContent2 = '
'
- + '
Building: '
+ + 'Space: '
+ '{{myMarkers[' + marker.myId + '].model.name}} '
+ 'Description: '
+ '{{myMarkers[' + marker.myId + '].model.description}} '
@@ -1303,7 +1312,7 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
$scope.zip = new JSZip();
$scope.DownloadBackup = function () {
-
+ LOG.D3("DownloadBackup")
var b = $scope.anyService.selectedBuilding;
var xFloors = [];
var jsonReq = AnyplaceService.jsonReq;
@@ -1311,25 +1320,26 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
$scope.anyService.progress = 0;
var promise = AnyplaceAPIService.allBuildingFloors(jsonReq);
promise.then(
- function (resp) {
+ function (resp) { // success
+ _info_autohide_timeout($scope, "Fetched floors..", 1500)
xFloors = resp.data.floors;
var floor = 0;
- var floor_number = "";
+ var floorNumbers = "";
for (var i = 0; i < xFloors.length; i++) {
if (i == 0) {
- floor_number = xFloors[i].floor_number;
+ floorNumbers = xFloors[i].floor_number;
}
else {
- floor_number = floor_number + " " + xFloors[i].floor_number;
+ floorNumbers = floorNumbers + " " + xFloors[i].floor_number;
}
}
$scope.anyService.progress = 10;
var buid = b.buid;
var jsonReq2 = AnyplaceService.jsonReq;
- var promise2 = AnyplaceAPIService.downloadFloorPlanAll(jsonReq2, buid, floor_number);
+ var promise2 = AnyplaceAPIService.downloadFloorPlanAll(jsonReq2, buid, floorNumbers);
promise2.then(
- function (resp) {
- // on success
+ function (resp) { // on success
+ _info_autohide_timeout($scope, "Fetched floorplans..", 1500)
var data = resp.data;
var img = $scope.zip.folder("floor_plans");
for (var si = 0; si < data.all_floors.length; si++) {
@@ -1340,27 +1350,25 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
$scope.anyService.progress = 25;
var jsonReq3 = AnyplaceService.jsonReq;
jsonReq3.buid = buid;
- jsonReq3.floor = floor_number;
+ jsonReq3.floors = floorNumbers;
var promise3 = AnyplaceAPIService.getRadioByBuildingFloorAll(jsonReq3);
- promise3.then(
- function (resp) {
+ promise3.then(function (resp) {
+ _info_autohide_timeout($scope, "Fetched radiomaps..", 1500)
var data2 = resp.data;
var logs = $scope.zip.folder("radiomaps");
if (data2.rss_log_files) {
- var urls = "";
for (var si2 = 0; si2 < data2.rss_log_files.length; si2++) {
logs.file(xFloors[si2].floor_number + "-radiomap.txt", data2.rss_log_files[si2]);
}
}
$scope.anyService.progress = 70;
$scope.exportPoisBuildingToJson();
- },
- function (resp) {
-
- }
- );
+ }, function (resp) {
+ ShowError($scope, resp, ERR_FETCH_ALL_RADIOMAPS, true);
+ });
},
function (resp) {
+ ShowError($scope, resp, ERR_FETCH_ALL_FLOORPLANS, true);
}
);
},
@@ -1397,28 +1405,20 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
$scope.anyService.progress = 80;
if (floors) {
for (var i = 0; i < floors.length; i++) {
-
(function (jreq) {
var promise = AnyplaceAPIService.retrievePoisByBuildingFloor(jreq);
promise.then(
function (resp) {
var data = resp.data;
-
var poisArray = data.pois;
-
if (poisArray) {
-
var flPois = [];
-
if (poisArray[0] != undefined) {
var fNo = poisArray[0].floor_number;
-
for (var j = 0; j < poisArray.length; j++) {
var sPoi = poisArray[j];
- if (sPoi.pois_type == "None") {
- continue;
- }
+ if (sPoi.pois_type == "None") { continue; }
if (sPoi.overwrite) {
var tmp = {
name: sPoi.name,
@@ -1429,8 +1429,7 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
coordinates_lon: sPoi.coordinates_lon,
overwrite: sPoi.overwrite
};
- }
- else {
+ } else {
var tmp = {
name: sPoi.name,
description: sPoi.description,
@@ -1444,20 +1443,16 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
if (sPoi.is_building_entrance == 'true') {
tmp.is_building_entrance = 'true';
- }
- else {
+ } else {
tmp.is_building_entrance = 'false';
}
-
flPois.push(tmp);
}
- resFloors.push(
- {
+ resFloors.push({
floor_number: fNo,
pois: flPois
- }
- );
+ });
}
count++;
if (count === floors.length) {
@@ -1471,7 +1466,7 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
},
function (resp) {
var data = resp.data;
- console.log(data.message);
+ LOG.E(data.message);
});
}({
buid: building.buid,
@@ -1481,14 +1476,12 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
}
},
function (resp) {
- // TODO: alert failure
- console.log(resp.data.message);
+ LOG.E(resp.data.message); // TODO: alert failure
}
);
};
$scope.exportConnectionBuildingToJson = function () {
-
var building = $scope.anyService.selectedBuilding;
if (LPUtils.isNullOrUndefined(building)) {
_err('No building selected');
@@ -1502,39 +1495,29 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
var jsonReq = AnyplaceService.jsonReq;
jsonReq.buid = building.buid;
-
var count = 0;
-
var promise = AnyplaceAPIService.allBuildingFloors(jsonReq);
promise.then(
function (resp) {
var floors = resp.data.floors;
-
var resFloors = [];
if (floors) {
for (var i = 0; i < floors.length; i++) {
-
(function (jreq) {
var promise = AnyplaceAPIService.retrieveConnectionsByBuildingFloor(jreq);
promise.then(
function (resp) {
$scope.anyService.progress = 100;
var data = resp.data;
-
var connArray = data.connections;
if (connArray) {
-
var flConnections = [];
-
if (connArray[0] != undefined) {
-
var fNo = connArray[0].floor_a;
-
for (var j = 0; j < connArray.length; j++) {
var sConnection = connArray[j];
-
var tmp = {
name: sConnection.name,
description: sConnection.description,
@@ -1548,21 +1531,17 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
buid_a: sConnection.buid_a,
buid_b: sConnection.buid_b
};
-
flConnections.push(tmp);
}
- resFloors.push(
- {
+ resFloors.push({
floor_number: fNo,
connections: flConnections
- }
- );
+ });
}
- count++;
+ count++;
if (count === floors.length) {
-
$scope.Connectionsresult.building.floors = resFloors;
$scope.zip.file("allconnections.json", JSON.stringify($scope.Connectionsresult, null, 4));
@@ -1587,7 +1566,7 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
}
},
function (resp) {
- console.log(resp.data.message);
+ LOG.E(resp.data.message);
}
);
};
@@ -1598,7 +1577,6 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
if (typeof(Storage) !== "undefined" && localStorage) {
localStorage.setItem('dismissClicked', 'YES');
}
-
});
if (localStorage.getItem('dismissClicked') !== 'YES') {
@@ -1608,5 +1586,4 @@ app.controller('BuildingController', ['$cookieStore', '$scope', '$compile', 'GMa
window.onload = showWelcomeMessage;
}
-
}]);
diff --git a/server/public/anyplace_architect/controllers/ControlBarController.js b/server/public/anyplace_architect/controllers/ControlBarController.js
index 21828e604..b492019fc 100644
--- a/server/public/anyplace_architect/controllers/ControlBarController.js
+++ b/server/public/anyplace_architect/controllers/ControlBarController.js
@@ -20,8 +20,10 @@
THE SOFTWARE.
*/
app.controller('ControlBarController',
- ['$scope', '$rootScope', 'AnyplaceService', 'GMapService', 'AnyplaceAPIService',
- function ($scope, $rootScope, AnyplaceService, GMapService, AnyplaceAPIService) {
+ ['$scope', '$rootScope',
+ 'AnyplaceService', 'GMapService', 'AnyplaceAPIService',
+ function ($scope, $rootScope,
+ AnyplaceService, GMapService, AnyplaceAPIService) {
$scope.anyService = AnyplaceService;
$scope.gmapService = GMapService;
@@ -43,7 +45,6 @@ app.controller('ControlBarController',
}
$scope.user = $scope.emptyUser
-
var self = this; //to be able to reference to it in a callback, you could use $scope instead
angular.element(document).ready(function () {
@@ -53,20 +54,13 @@ app.controller('ControlBarController',
}
});
- $scope.setAuthenticated = function (bool) {
- $scope.isAuthenticated = bool;
- };
-
$scope.showFullControls = true;
+ $scope.setAuthenticated = function (bool) { $scope.isAuthenticated = bool; };
+ $scope.toggleFullControls = function () { $scope.showFullControls = !$scope.showFullControls; };
- $scope.toggleFullControls = function () {
- $scope.showFullControls = !$scope.showFullControls;
- };
-
- // // not called
- // var apiClientLoaded = function () {
- // gapi.client.plus.people.get({userId: 'me'}).execute(handleEmailResponse);
- // };
+ // not called
+ // var apiClientLoaded = function () { gapi.client.plus.people.get({userId: 'me'}).execute(handleEmailResponse); };
+ // var handleEmailResponse = function (resp) { $scope.personLookUp(resp, googleAuth); };
$scope.copyApiKey = function () {
LOG.W("Copying api key")
@@ -77,11 +71,6 @@ app.controller('ControlBarController',
_info($scope, "API key copied!");
}
- // var handleEmailResponse = function (resp) {
- // console.log("handleEmailResponse ?");
- // $scope.personLookUp(resp, googleAuth);
- // };
-
$scope.showGoogleID = function () {
if (!$scope.user.google) { return; }
AnyplaceService.addAlert('success', 'Google ID is: ' + $scope.user.id);
@@ -95,22 +84,20 @@ app.controller('ControlBarController',
$scope.onSignIn = function (googleUser) {
if ($scope.getCookie("reloadedAfterLogin") === "") {
$scope.setCookie("reloadedAfterLogin", "true", 365);
+ LOG.D2("onSignIn: reloading")
location.reload();
}
+
$scope.setAuthenticated(true);
$scope.user = $scope.emptyUser
$scope.user.google = {}
-
var googleAuth = gapi.auth2.getAuthInstance().currentUser.get().getAuthResponse();
LOG.D4("user.google.auth")
LOG.D4(googleAuth)
-
$scope.googleUserLookup(googleUser, googleAuth);
};
- $scope.onSignInFailure = function () {
- LOG.E('Signin failed');
- };
+ $scope.onSignInFailure = function () { LOG.E('Signin failed'); };
window.onSignIn = $scope.onSignIn;
window.onSignInFailure = $scope.onSignInFailure;
@@ -137,7 +124,6 @@ app.controller('ControlBarController',
// google id
$scope.user.google.id = $scope.user.google._id + '_' + $scope.user.accountType;
-
var promise = AnyplaceAPIService.loginGoogle({
name: $scope.user.name,
external: "google",
@@ -164,7 +150,6 @@ app.controller('ControlBarController',
$scope.refreshLocalLogin = function () {
LOG.D3("refreshLocalLogin");
-
var jsonReq = {};
var cookieAccessToken = $scope.getCookie("localAccessToken");
if (cookieAccessToken === "") { return; }
@@ -172,7 +157,6 @@ app.controller('ControlBarController',
jsonReq.access_token = cookieAccessToken;
LOG.D2("Refreshing local login. token:" + cookieAccessToken);
- // if ($scope.getCookie("localAccessToken") === "") {
var promise = AnyplaceAPIService.refreshLocalAccount(jsonReq);
promise.then(
function (resp) { // on success
@@ -189,10 +173,7 @@ app.controller('ControlBarController',
$scope.user.access_token = data.user.access_token;
app.user=$scope.user;
$scope.setAuthenticated(true);
-
- if ($scope.user && $scope.user.id) {
- $scope.$broadcast('loggedIn', []);
- }
+ if ($scope.user && $scope.user.id) { $scope.$broadcast('loggedIn', []); }
},
function (resp) {
ShowError($scope, resp,"Login refresh failed.", true)
@@ -218,7 +199,6 @@ app.controller('ControlBarController',
$scope.user.id = data.user.owner_id;
$scope.user.accountType = "local";
$scope.user.type = data.user.type;
-
$scope.user.access_token = data.user.access_token;
app.user=$scope.user;
$scope.setAuthenticated(true);
@@ -245,9 +225,7 @@ app.controller('ControlBarController',
jsonReq.password = $scope.user.password;
var promise = AnyplaceAPIService.registerLocalAccount(jsonReq);
- promise.then(
- function (resp) {
- // on success
+ promise.then(function (resp) { // on success
var data = resp.data;
_suc($scope, "Successfully registered!");
},
@@ -264,10 +242,8 @@ app.controller('ControlBarController',
$scope.$broadcast('loggedOff', []);
$scope.user={};
-
clearFingerprintCoverage();
clearFingerprintHeatmap();
-
$scope.deleteCookie("reloadedAfterLogin");
$scope.deleteCookie("localAccessToken");
};
@@ -275,7 +251,6 @@ app.controller('ControlBarController',
function clearFingerprintCoverage() {
var check = 0;
if (heatMap[check] !== undefined && heatMap[check] !== null) {
-
var i = heatMap.length;
while (i--) {
heatMap[i].rectangle.setMap(null);
@@ -323,9 +298,7 @@ app.controller('ControlBarController',
document.getElementById("fingerPrints-mode").classList.remove('quickaction-selected');
_HEATMAP_F_IS_ON = false;
var i = heatmapFingerprints.length;
- while (i--) {
- heatmapFingerprints[i] = null;
- }
+ while (i--) { heatmapFingerprints[i] = null; }
heatmapFingerprints = [];
}
}
@@ -335,12 +308,8 @@ app.controller('ControlBarController',
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
- while (c.charAt(0) == ' ') {
- c = c.substring(1);
- }
- if (c.indexOf(name) == 0) {
- return c.substring(name.length, c.length);
- }
+ while (c.charAt(0) == ' ') { c = c.substring(1); }
+ if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); }
}
return "";
};
@@ -357,14 +326,8 @@ app.controller('ControlBarController',
};
$scope.tab = 1;
-
- $scope.setTab = function (num) {
- $scope.tab = num;
- };
-
- $scope.isTabSet = function (num) {
- return $scope.tab === num;
- };
+ $scope.setTab = function (num) { $scope.tab = num; };
+ $scope.isTabSet = function (num) { return $scope.tab === num; };
$scope.isAdmin = function () {
if ($scope.user == null) {
@@ -386,22 +349,15 @@ app.controller('ControlBarController',
}
};
- var _err = function (msg) {
- $scope.anyService.addAlert('danger', msg);
- };
-
var myLocMarker = undefined;
$scope.userPosition = undefined;
var pannedToUserPosOnce = false;
$scope.isUserLocVisible = false;
- $scope.getIsUserLocVisible = function () {
- return $scope.isUserLocVisible;
- };
+ $scope.getIsUserLocVisible = function () { return $scope.isUserLocVisible; };
$scope.panToUserLocation = function () {
- if (!$scope.userPosition)
- return;
+ if (!$scope.userPosition) return;
GMapService.gmap.panTo($scope.userPosition);
GMapService.gmap.setZoom(20);
@@ -420,8 +376,7 @@ app.controller('ControlBarController',
return;
}
var s = new google.maps.Size(20, 20);
- if ($scope.isFirefox)
- s = new google.maps.Size(48, 48);
+ if ($scope.isFirefox) s = new google.maps.Size(48, 48);
myLocMarker = new google.maps.Marker({
position: posLatlng,
@@ -443,28 +398,19 @@ app.controller('ControlBarController',
$scope.isUserLocVisible = false;
};
-
$scope.showUserLocation = function () {
-
if ($scope.getIsUserLocVisible()) {
$scope.hideUserLocation();
-
- if (navigator.geolocation)
- navigator.geolocation.clearWatch(watchPosNum);
-
+ if (navigator.geolocation) navigator.geolocation.clearWatch(watchPosNum);
return;
}
if (navigator.geolocation) {
watchPosNum = navigator.geolocation.watchPosition(
function (position) {
-
var posLatlng = {lat: position.coords.latitude, lng: position.coords.longitude};
- //var radius = position.coords.accuracy;
-
$scope.userPosition = posLatlng;
$scope.displayMyLocMarker(posLatlng);
-
var infowindow = new google.maps.InfoWindow({
content: 'Your current location.',
maxWidth: 500
@@ -509,7 +455,7 @@ app.controller('ControlBarController',
$scope.centerViewToSelectedItem = function () {
if ($scope.anyService.selectedBuilding == null || $scope.anyService.selectedBuilding == undefined) {
- _err($scope, "You have to select a building first");
+ _warn_autohide_timeout($scope, "Select a space first", 2000);
return;
}
var position = {};
diff --git a/server/public/anyplace_architect/controllers/FloorController.js b/server/public/anyplace_architect/controllers/FloorController.js
index b752c4888..fa31b30c9 100644
--- a/server/public/anyplace_architect/controllers/FloorController.js
+++ b/server/public/anyplace_architect/controllers/FloorController.js
@@ -25,44 +25,33 @@
THE SOFTWARE.
*/
-
-
var changedfloor = false;
-app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', 'AnyplaceAPIService', function ($scope, AnyplaceService, GMapService, AnyplaceAPIService) {
+app.controller('FloorController',
+ ['$scope', 'AnyplaceService', 'GMapService', 'AnyplaceAPIService',
+ function ($scope, AnyplaceService, GMapService, AnyplaceAPIService) {
$scope.anyService = AnyplaceService;
$scope.anyAPI = AnyplaceAPIService;
$scope.gmapService = GMapService;
- //$scope.controlBarService = ControlBarController;
$scope.xFloors = [];
-
$scope.myFloors = {};
$scope.myFloorId = 0;
-
$scope.newFloorNumber = 0;
- var heatmap;
-
+ $scope.isUploadingFloorplan = false;
+ var heatmap;
$scope.crudTabSelected = 1;
- $scope.setCrudTabSelected = function (n) {
- $scope.crudTabSelected = n;
- };
- $scope.isCrudTabSelected = function (n) {
-
- return $scope.crudTabSelected === n;
- };
-
+ $scope.setCrudTabSelected = function (n) { $scope.crudTabSelected = n; };
+ $scope.isCrudTabSelected = function (n) { return $scope.crudTabSelected === n; };
$scope.data = {
floor_plan_coords: {},
floor_plan_base64_data: {},
- floor_plan_groundOverlay: null
+ floor_plan_groundOverlay: null,
+ floorPlanPrevOverlay: null,
};
- $scope.$on("loggedOff", function (event, mass) {
- _clearFloors();
- });
-
+ $scope.$on("loggedOff", function (event, mass) { _clearFloors(); });
var _clearFloors = function () {
$scope.removeFloorPlan();
$scope.xFloors = [];
@@ -80,23 +69,20 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
$scope.$watch('anyService.selectedBuilding', function (newVal, oldVal) {
if (newVal) {
changedfloor = false;
-
$scope.fetchAllFloorsForBuilding(newVal);
}
});
- /**
- $scope.$watch('anyService.selectedPoi', function (newVal, oldVal) {
- if (newVal && _latLngFromPoi(newVal)) {
- $scope.showRadioHeatmapPoi();
- }
- });
- */
- $scope.$watch('newFloorNumber', function (newVal, oldVal) {
- //if (_floorNoExists(newVal)) {
- // _setNextFloor();
- //}
- });
+ // $scope.$watch('anyService.selectedPoi', function (newVal, oldVal) {
+ // if (newVal && _latLngFromPoi(newVal)) {
+ // $scope.showRadioHeatmapPoi();
+ // }
+ // });
+ // $scope.$watch('newFloorNumber', function (newVal, oldVal) {
+ // if (_floorNoExists(newVal)) {
+ // _setNextFloor();
+ // }
+ // });
var _latLngFromBuilding = function (b) {
if (b && b.coordinates_lat && b.coordinates_lon) {
@@ -109,36 +95,25 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
};
$scope.$watch('anyService.selectedFloor', function (newVal, oldVal) {
- if (newVal !== undefined && newVal !== null && !_.isEqual(newVal, oldVal)) {
- $scope.fetchFloorPlanOverlay(newVal);
- GMapService.gmap.panTo(_latLngFromBuilding($scope.anyService.selectedBuilding));
- GMapService.gmap.setZoom(19);
-
- if (typeof(Storage) !== "undefined" && localStorage) {
- localStorage.setItem("lastFloor", newVal.floor_number);
+ if (!$scope.isUploadingFloorplan) { // if we are still uploading a floorplan, the refresh will fail.
+ if (newVal !== undefined && newVal !== null && !_.isEqual(newVal, oldVal)) {
+ $scope.fetchFloorPlanOverlay(newVal);
+ changedfloor = false;
}
-
- changedfloor = false;
}
-
});
$scope.fetchAllFloorsForBuilding = function (b) {
- // TODO: check for b.buid
var jsonReq = AnyplaceService.jsonReq;
jsonReq.buid = b.buid;
-
var promise = AnyplaceAPIService.allBuildingFloors(jsonReq);
promise.then(
function (resp) {
-
$scope.xFloors = resp.data.floors;
-
$scope.xFloors = $scope.xFloors.sort(function (a, b) {
return parseInt(a.floor_number) - parseInt(b.floor_number)
});
-
$scope.anyService.availableFloors = [];
$scope.anyService.availableFloors = $scope.xFloors;
@@ -168,16 +143,12 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
} else {
$scope.anyService.selectedFloor = undefined;
}
-
_setNextFloor();
-// _suc($scope, "Successfully fetched all floors.");
-
},
function (resp) {
ShowError($scope, resp, ERR_FETCH_ALL_FLOORS, true);
}
);
-
};
var _setNextFloor = function () {
@@ -191,50 +162,58 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
};
var _isValidFloorNumber = function (fl) {
- if (fl === null || fl == undefined) {
- return false;
- }
+ if (fl === null || fl == undefined) { return false; }
- if (fl.floor_number === null || fl.floor_number === undefined) {
- return false;
- }
+ if (fl.floor_number === null || fl.floor_number === undefined) { return false; }
return true;
};
$scope.fetchFloorPlanOverlay = function () {
-
if (!_isValidFloorNumber(this.anyService.selectedFloor)) {
- // TODO: alert
- _warn_autohide($scope, 'Something is wrong with the floor');
- console.log('Something is wrong with the floor');
+ _warn_autohide($scope, 'Something is wrong with the floor');
return;
}
var floor_number = this.anyService.selectedFloor.floor_number;
- var buid = this.anyService.selectedBuilding.buid;
-
+ var space = this.anyService.selectedBuilding;
+ var buid = space.buid;
var promise = AnyplaceAPIService.downloadFloorPlan(this.anyService.jsonReq, buid, floor_number);
promise.then(
- function (resp) {
-
+ function (resp) { // on success
+ LOG.D3("fetched floorplan overlay")
+ var data = resp.data;
$scope.data.floor_plan_file = null;
$scope.data.floor_plan = null;
+
+ // hide this and the previous overlay
if ($scope.data.floor_plan_groundOverlay != null) {
$scope.data.floor_plan_groundOverlay.setMap(null);
$scope.data.floor_plan_groundOverlay = null;
+ // hide the previous of the last overlay (maximum overlay history: 1)
+ if ($scope.data.floorPlanPrevOverlay) {
+ LOG.D3("hiding previous");
+ $scope.data.floorPlanPrevOverlay.setMap(null);
+ $scope.data.floorPlanPrevOverlay = null;
+ }
}
- // on success
- var data = resp.data;
-
// load the correct coordinates from the selected floor
var fl = $scope.anyService.selectedFloor;
var imageBounds = new google.maps.LatLngBounds(
new google.maps.LatLng(fl.bottom_left_lat, fl.bottom_left_lng),
new google.maps.LatLng(fl.top_right_lat, fl.top_right_lng));
- $scope.data.floor_plan_groundOverlay = new USGSOverlay(imageBounds, "data:image/png;base64," + data, GMapService.gmap);
+ $scope.data.floorPlanPrevOverlay = $scope.data.floor_plan_groundOverlay;
+ $scope.data.floor_plan_groundOverlay =
+ new USGSOverlay(imageBounds, "data:image/png;base64," + data, GMapService.gmap);
+
+ // pan to location and cache the floor num
+ GMapService.gmap.panTo(_latLngFromBuilding($scope.anyService.selectedBuilding));
+ if (GMapService.gmap.getZoom() < 19) { GMapService.gmap.setZoom(19); }
+ if (typeof(Storage) !== "undefined" && localStorage) {
+ localStorage.setItem("lastFloor", floor_number);
+ }
},
function (resp) {
ShowWarningAutohide($scope, resp, "Error downloading floor plan");
@@ -244,38 +223,48 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
var canvasOverlay = null;
$scope.isCanvasOverlayActive = false;
-
var floorPlanInputElement = $('#input-floor-plan');
floorPlanInputElement.change(function handleImage(e) {
var reader = new FileReader();
reader.onload = function (event) {
var imgObj = new Image();
- imgObj.src = event.target.result;
+ imgObj.src = reader.result;
+
imgObj.onload = function () {
- canvasOverlay = new CanvasOverlay(imgObj, GMapService.gmap);
+ canvasOverlay = new CanvasOverlay(imgObj, GMapService.gmap, $scope);
+ GMapService.gmap.panTo(_latLngFromBuilding($scope.anyService.selectedBuilding));
+ GMapService.gmap.setZoom(19);
$scope.$apply($scope.isCanvasOverlayActive = true);
- // hide previous floorplan
- if ($scope.data.floor_plan_groundOverlay && $scope.data.floor_plan_groundOverlay.getMap()) {
- $scope.data.floor_plan_groundOverlay.setMap(null);
+ if ($scope.data.floor_plan_groundOverlay != null
+ && $scope.data.floor_plan_groundOverlay.getMap()) {
+ var overlayMode = $('#overlay-mode').prop("checked");
+ if (!overlayMode) { // hide the last overlay
+ $scope.data.floor_plan_groundOverlay.setMap(null);
+ $scope.data.floor_plan_groundOverlay = null;
+ } else {
+ // hide the previous of the last overlay (maximum overlay history: 1)
+ if ($scope.data.floorPlanPrevOverlay) {
+ LOG.D3("hiding previous (on new image upload)");
+ $scope.data.floorPlanPrevOverlay.setMap(null);
+ $scope.data.floorPlanPrevOverlay = null;
+ }
+ $scope.data.floorPlanPrevOverlay = $scope.data.floor_plan_groundOverlay;
+ $scope.data.floor_plan_groundOverlay = null;
+ }
}
-
}
-
};
reader.readAsDataURL(e.target.files[0]);
-
this.disabled = true;
});
$scope.setFloorPlan = function () {
- if (!canvasOverlay) {
- return;
- }
+ if (!canvasOverlay) { return; }
- if (GMapService.gmap.getZoom() < 20) {
- _err($scope, "Minimum zoom level required: 20. Current: " + GMapService.gmap.getZoom());
+ if (GMapService.gmap.getZoom() < 18) {
+ _warn_autohide($scope, "Minimum zoom level: 18. (current: " + GMapService.gmap.getZoom() + ")");
return;
}
@@ -298,7 +287,6 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
// create the proper image inside the canvas
canvasOverlay.drawBoundingCanvas();
-
// create the ground overlay and destroy the canvasOverlay object
// and also set the floor_plan_coords in $scope.data
var bl = canvasOverlay.bottom_left_coords;
@@ -309,6 +297,7 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
$scope.data.floor_plan_coords.top_right_lng = tr.lng();
$scope.data.floor_plan_coords.zoom = GMapService.gmap.getZoom() + "";
var data = canvasOverlay.getCanvas().toDataURL("image/png"); // defaults to png
+
$scope.data.floor_plan_base64_data = data;
var imageBounds = new google.maps.LatLngBounds(
new google.maps.LatLng(bl.lat(), bl.lng()),
@@ -319,47 +308,44 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
$('#input-floor-plan').prop('disabled', false);
$scope.isCanvasOverlayActive = false;
- // This if is never true (?) CHECK
- if (_floorNoExists($scope.newFloorNumber)) {
+ if (_floorNoExists($scope.newFloorNumber)) { // This if is never true (?) CHECK
for (var i = 0; i < $scope.xFloors.length; i++) {
var f = $scope.xFloors[i];
if (!LPUtils.isNullOrUndefined(f)) {
if (f.floor_number === String($scope.newFloorNumber)) {
+ LOG.D3("setFloorPlan: uploadWithZoom: data: " + $scope.data.size)
$scope.uploadWithZoom($scope.anyService.selectedBuilding, f, $scope.data);
break;
}
}
}
} else {
+ LOG.D3("setFloorPlan: addFloorObject")
$scope.addFloorObject(newFl, $scope.anyService.selectedBuilding, $scope.data);
}
};
var _checkFloorFormat = function (bobj) {
- if (bobj === null) {
- bobj = {}
- } else {
- bobj = JSON.parse(JSON.stringify(bobj))
- }
- if (LPUtils.isNullOrUndefined(bobj.buid)) {
- bobj.buid = ""
- }
- if (LPUtils.isNullOrUndefined(bobj.floor_name)) {
- bobj.floor_name = ""
- }
- if (LPUtils.isNullOrUndefined(bobj.floor_number)) {
- bobj.floor_number = ""
- }
- if (LPUtils.isNullOrUndefined(bobj.description)) {
- bobj.description = ""
- }
- if (LPUtils.isNullOrUndefined(bobj.is_published)) {
- bobj.is_published = 'true'
- }
+ if (bobj === null) bobj = {}
+ else bobj = JSON.parse(JSON.stringify(bobj))
+
+ if (LPUtils.isNullOrUndefined(bobj.buid)) { bobj.buid = "" }
+ if (LPUtils.isNullOrUndefined(bobj.floor_name)) { bobj.floor_name = "" }
+ if (LPUtils.isNullOrUndefined(bobj.floor_number)) { bobj.floor_number = "" }
+ if (LPUtils.isNullOrUndefined(bobj.description)) { bobj.description = "" }
+ if (LPUtils.isNullOrUndefined(bobj.is_published)) { bobj.is_published = 'true' }
return bobj;
};
+ /**
+ * Creates a Floor entry before uploading with the zoom. That is two API calls.
+ *
+ * @param flJson
+ * @param selectedBuilding
+ * @param flData
+ */
$scope.addFloorObject = function (flJson, selectedBuilding, flData) {
+ LOG.D("addFloorObject:")
var obj = _checkFloorFormat(flJson);
var promise = $scope.anyAPI.addFloor(obj); // make the request at AnyplaceAPI
promise.then(
@@ -367,13 +353,12 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
var data = resp.data;
// insert the newly created building inside the loadedBuildings
$scope.xFloors.push(obj);
- $scope.anyService.selectedFloor = $scope.xFloors[$scope.xFloors.length - 1];
- _suc($scope, "Successfully added new floor");
+ LOG.D2("Created floor.");
$scope.uploadWithZoom(selectedBuilding, obj, flData);
+ $scope.anyService.selectedFloor = $scope.xFloors[$scope.xFloors.length - 1];
},
function (resp) {
- ShowError($scope, resp,
- "Something went wrong while adding a new floor.", true);
+ ShowError($scope, resp, "Could not create floor.", true);
}
);
@@ -383,26 +368,20 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
$scope.data.floor_plan_file = null;
$scope.data.floor_plan = null;
- if (canvasOverlay) {
- canvasOverlay.setMap(null);
- }
-
-
- if ($scope.data.floor_plan_groundOverlay) {
- $scope.data.floor_plan_groundOverlay.setMap(null);
- }
+ if (canvasOverlay) { canvasOverlay.setMap(null); }
+ if ($scope.data.floor_plan_groundOverlay) { $scope.data.floor_plan_groundOverlay.setMap(null); }
var x = $('#input-floor-plan');
x.replaceWith(x = x.clone(true));
-
x.prop('disabled', false);
-
$scope.isCanvasOverlayActive = false;
};
$scope.deleteFloor = function () {
var bobj = $scope.anyService.getFloor();
- if (LPUtils.isNullOrUndefined(bobj) || LPUtils.isStringBlankNullUndefined(bobj.floor_number) || LPUtils.isStringBlankNullUndefined(bobj.buid)) {
+ if (LPUtils.isNullOrUndefined(bobj)
+ || LPUtils.isStringBlankNullUndefined(bobj.floor_number)
+ || LPUtils.isStringBlankNullUndefined(bobj.buid)) {
_err($scope, "No floor seems to be selected.");
return;
}
@@ -429,7 +408,7 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
} else {
$scope.anyService.selectedFloor = undefined;
}
- _suc($scope, "Successfully deleted floor.");
+ _suc($scope, "Floor deleted.");
},
function (resp) {
ShowError($scope, resp, "Something went wrong while deleting the floor.", true);
@@ -437,7 +416,6 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
);
};
-
var _floorNoExists = function (n) {
for (var i = 0; i < $scope.xFloors.length; i++) {
var f = $scope.xFloors[i];
@@ -452,28 +430,23 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
};
var _cloneCoords = function (obj) {
- if (LPUtils.isNullOrUndefined(obj)) {
- return {}
- }
+ if (LPUtils.isNullOrUndefined(obj)) { return {} }
var n = JSON.parse(JSON.stringify(obj));
return n;
};
-
$scope.uploadWithZoom = function (sb, sf, flData) {
- if (LPUtils.isNullOrUndefined(canvasOverlay)) {
- return;
- }
+ LOG.D3("uploadWithZoom")
+ if (LPUtils.isNullOrUndefined(canvasOverlay)) { return; }
var bobj = _cloneCoords(flData.floor_plan_coords);
-
if (LPUtils.isNullOrUndefined(bobj) || LPUtils.isStringBlankNullUndefined(bobj.bottom_left_lat)
|| LPUtils.isStringBlankNullUndefined(bobj.bottom_left_lng)
|| LPUtils.isStringBlankNullUndefined(bobj.top_right_lat)
|| LPUtils.isStringBlankNullUndefined(bobj.top_right_lng)) {
- console.log('error with floor coords');
- _err($scope, "Something went wrong. It seems like no valid coordinates have been set up for this floor plan.");
+ LOG.E('error with floor coords');
+ _err($scope, "No valid coordinates for this floorplan.");
return;
}
@@ -491,12 +464,11 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
if (!LPUtils.isNullOrUndefined(sb.buid)) {
bobj.buid = sb.buid;
} else {
- _err($scope, "Something went wrong with the selected building's id.");
+ _err($scope, "Something wrong with the space id.");
return;
}
- } else {
- // no building selected
- _err($scope, "Something went wrong. It seems like there is no building selected.");
+ } else { // no building selected
+ _err($scope, "No space selected.");
return;
}
@@ -504,41 +476,36 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
if (!LPUtils.isNullOrUndefined(sf.floor_number)) {
bobj.floor_number = sf.floor_number;
} else {
- _err($scope, "Something went wrong. It seems there is no floor number associated with the selected floor.");
+ _err($scope, "No number associated with the selected floor.");
return;
}
- } else {
- // no floor selected
- _err($scope, "Something went wrong. It seems there is no floor selected.");
+ } else { // no floor selected
+ _err($scope, "No floor selected.");
return;
}
bobj.owner_id = $scope.owner_id;
-
var json_req = JSON.stringify(bobj);
-
if (LPUtils.isNullOrUndefined(flData.floor_plan_base64_data)
|| LPUtils.isStringEmptyNullUndefined(flData.floor_plan_base64_data)) {
- console.log('no floor plan file');
+ LOG.E('No floor plan file');
return;
}
- // make the request at AnyplaceAPI
+ $scope.isUploadingFloorplan=true;
+ _info($scope, "Uploading and processing floorplan ...");
var promise = $scope.anyAPI.uploadFloorPlan64(json_req, $scope.data.floor_plan_base64_data);
promise.then(
- function (resp) {
- // on success
- var data = resp.data;
- _suc($scope, "Successfully uploaded new floor plan.");
+ function (resp) { // on success
+ $scope.isUploadingFloorplan=false;
+ _suc("Floorplan uploaded and tiled.");
+ $scope.fetchFloorPlanOverlay(sf.floor_number);
},
- function (resp) {
- // on error
- var data = resp.data;
- //TODO: alert error
- _suc($scope, "Successfully uploaded new floor plan.");
- });
-
+ function (resp) { // on error
+ $scope.isUploadingFloorplan=false;
+ ShowError($scope, resp, "Upload error", true);
+ }); // on error
};
$scope.showRadioHeatmapPoi = function () {
@@ -550,43 +517,31 @@ app.controller('FloorController', ['$scope', 'AnyplaceService', 'GMapService', '
"range": "1"
};
- jsonReq.username = $scope.creds.username;
- jsonReq.password = $scope.creds.password;
-
var promise = $scope.anyAPI.getRadioHeatmapPoi(jsonReq);
promise.then(
function (resp) {
// on success
var data = resp.data;
-
var heatMapData = [];
-
var i = resp.data.radioPoints.length;
if (i <= 0) {
- _err($scope, "This floor seems not to be WiFi mapped. Download the Anyplace app from the Google Play store to map the floor.");
+ _err($scope, "Floor not mapped. Use logger (Google Play) to map it.");
return;
}
while (i--) {
var rp = resp.data.radioPoints[i];
- heatMapData.push(
- {location: new google.maps.LatLng(rp.x, rp.y), weight: 1}
- );
+ heatMapData.push( {location: new google.maps.LatLng(rp.x, rp.y), weight: 1} );
resp.data.radioPoints.splice(i, 1);
}
- if (heatmap && heatmap.getMap()) {
- heatmap.setMap(null);
- }
-
- heatmap = new google.maps.visualization.HeatmapLayer({
- data: heatMapData
- });
+ if (heatmap && heatmap.getMap()) { heatmap.setMap(null); }
+ heatmap = new google.maps.visualization.HeatmapLayer({ data: heatMapData });
heatmap.setMap($scope.gmapService.gmap);
},
function (resp) {
- ShowError($scope, resp, "Something went wrong while fetching radio heatmap.", true);
+ ShowWarningAutohide($scope, resp, "", false);
}
);
}
diff --git a/server/public/anyplace_architect/controllers/PoiController.js b/server/public/anyplace_architect/controllers/PoiController.js
index fe302c1d0..d4fb8b065 100644
--- a/server/public/anyplace_architect/controllers/PoiController.js
+++ b/server/public/anyplace_architect/controllers/PoiController.js
@@ -1095,7 +1095,7 @@ app.controller('PoiController', ['$scope', '$compile', 'GMapService', 'AnyplaceS
break;
}
}
- _suc($scope, "Successfully deleted POI.");
+ _info_autohide($scope, "POI deleted.", 1000);
},
function (resp) {
// on error
diff --git a/server/public/anyplace_architect/controllers/SelectFloorController.js b/server/public/anyplace_architect/controllers/SelectFloorController.js
index 1f672549c..6e9fa2eca 100644
--- a/server/public/anyplace_architect/controllers/SelectFloorController.js
+++ b/server/public/anyplace_architect/controllers/SelectFloorController.js
@@ -47,28 +47,23 @@ app.controller('SelectFloorController', ['$scope', 'AnyplaceService', 'GMapServi
};
$scope.floorUp = function () {
- //here new
changedfloor = true;
var next;
for (var i = 0; i < $scope.xFloors.length; i++) {
next = i + 1;
if ($scope.xFloors[i].floor_number === $scope.anyService.selectedFloor.floor_number) {
-
if (next < $scope.xFloors.length) {
$scope.anyService.selectedFloor = $scope.xFloors[next];
return;
} else {
- //_warn("There is no other floor above.");
return;
}
}
}
-
_err($scope, "Floor not found.");
};
$scope.floorDown = function () {
-
changedfloor = true;
var prev;
for (var i = 0; i < $scope.xFloors.length; i++) {
@@ -79,12 +74,10 @@ app.controller('SelectFloorController', ['$scope', 'AnyplaceService', 'GMapServi
$scope.anyService.selectedFloor = $scope.xFloors[prev];
return;
} else {
- //_warn("There is no other floor below.");
return;
}
}
}
-
_err($scope, "Floor not found.");
};
diff --git a/server/public/anyplace_architect/controllers/WiFiController.js b/server/public/anyplace_architect/controllers/WiFiController.js
index 1126fca47..fa72c305f 100644
--- a/server/public/anyplace_architect/controllers/WiFiController.js
+++ b/server/public/anyplace_architect/controllers/WiFiController.js
@@ -513,9 +513,7 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
if (_APs_IS_ON) {
var i = APmap.length;
-
- //hide Access Points
- while (i--) {
+ while (i--) { //hide Access Points
APmap[i].setMap(null);
APmap[i] = null;
$scope.example9data[i] = null;
@@ -537,9 +535,7 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
}
if (_FINGERPRINTS_IS_ON) {
var i = fingerPrintsMap.length;
-
- //hide fingerPrints
- while (i--) {
+ while (i--) { //hide fingerPrints
fingerPrintsMap[i].setMap(null);
fingerPrintsMap[i] = null;
}
@@ -547,11 +543,9 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
$scope.showFingerprintHeatmap();
if ($scope.fingerPrintsTimeMode && !$scope.radioHeatmapRSSTimeMode) {
-
d3.selectAll("svg > *").remove();
$("svg").remove();
$scope.getFingerPrintsTime();
-
}
}
@@ -560,9 +554,7 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
//hide fingerPrints heatmap
heatmap.setMap(null);
var i = heatmapFingerprints.length;
- while (i--) {
- heatmapFingerprints[i] = null;
- }
+ while (i--) { heatmapFingerprints[i] = null; }
heatmapFingerprints = [];
_HEATMAP_F_IS_ON = false;
@@ -576,8 +568,7 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
}
}
- if (heatmapAcc && heatmapAcc.getMap()) {
- //hide acces heatmap
+ if (heatmapAcc && heatmapAcc.getMap()) { // hide acces heatmap
heatmapAcc.setMap(null);
$scope.showLocalizationAccHeatmap();
}
@@ -592,18 +583,14 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
for (var key in connectionsMap) {
if (connectionsMap.hasOwnProperty(key)) {
var con = connectionsMap[key];
- if (con && con.polyLine) {
- con.polyLine.setMap(null);
- }
+ if (con && con.polyLine) { con.polyLine.setMap(null); }
}
-
}
$scope.anyService.setAllConnection(connectionsMap);
connectionsMap = {};
}
}
}
-
}
if (!_POIS_IS_ON) {
@@ -611,34 +598,36 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
if (POIsMap !== undefined) {
var key = Object.keys(POIsMap);
if (POIsMap[key[check]] !== undefined) {
-
if (POIsMap[key[check]].marker.getMap() !== null) {
-
for (var key in POIsMap) {
if (POIsMap.hasOwnProperty(key)) {
var p = POIsMap[key];
- if (p && p.marker) {
- p.marker.setMap(null);
-
- }
+ if (p && p.marker) { p.marker.setMap(null); }
}
}
-
$scope.anyService.setAllPois(POIsMap);
POIsMap = {};
-
}
}
}
}
changedfloor = false;
}
-
});
+ /**
+ * Shows the Wi-Fi Coverage:
+ * - draws boxes of colors green/yellow/darkYellow/Magenta/Red
+ * - these denote the signal coverage in the building.
+ * - It walls getRadioHeatmapRSS_N according to the zoom level (1 to 3, where 3 is max).
+ */
$scope.toggleCoverage = function () {
LOG.D2("toggleCoverage");
+ if (!$scope.anyService.hasSelectedFloor()) {
+ _warn_autohide($scope, "No floor selected (for coverage).")
+ return;
+ }
// if coverage map is combined with timestamp, on hide remove crossfilter bar
if (_HEATMAP_FINGERPRINT_COVERAGE && $scope.fingerPrintsTimeMode) {
@@ -655,11 +644,8 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
$scope.anyService.fingerPrintsTimeMode = !$scope.anyService.fingerPrintsTimeMode;
}
- // if ()
-
var check = 0;
if ((heatMap[check] !== undefined && heatMap[check] !== null) || $scope.radioHeatmapRSSTimeMode) {
-
var i = heatMap.length;
while (i--) {
heatMap[i].rectangle.setMap(null);
@@ -714,13 +700,9 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
};
$scope.toggleAPs = function () {
-
var check = 0;
-
- if (APmap[check] !== undefined && APmap[check] !== null) {
+ if (APmap[check] !== undefined && APmap[check] !== null) { // hide Access Points
var i = APmap.length;
-
- //hide Access Points
while (i--) {
APmap[i].setMap(null);
APmap[i] = null;
@@ -733,60 +715,63 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
$scope.example8model[i] = null;
}
- APmap = [];
- $scope.example9data = [];
- $scope.example9model = [];
- $scope.example8data = [];
- $scope.example8model = [];
- _APs_IS_ON = false;
- $scope.filterByMAC = false;
- $scope.filterByMAN = false;
- document.getElementById("APs-mode").classList.remove('quickaction-selected');
- $scope.APsMode = false;
- if (typeof (Storage) !== "undefined" && localStorage) {
- localStorage.setItem('APsMode', 'NO');
- }
+ $scope.prefDisableApsMode();
return;
-
}
- _APs_IS_ON = true;
-
- $scope.APsMode = true;
- if (typeof (Storage) !== "undefined" && localStorage) {
- localStorage.setItem('APsMode', 'YES');
+ if ($scope.anyService.hasSelectedFloor()) {
+ $scope.prefEnableApsMode();
+ $scope.showAPs();
+ } else {
+ $scope.prefDisableApsMode();
+ _warn_autohide($scope, "No floor selected (for access points).");
}
+ };
+ $scope.prefEnableApsMode = function () {
+ _APs_IS_ON = true;
+ $scope.APsMode = true;
+ if (typeof (Storage) !== "undefined" && localStorage) { localStorage.setItem('APsMode', 'YES'); }
document.getElementById("APs-mode").classList.add('quickaction-selected');
-
- $scope.showAPs();
-
};
+ $scope.prefDisableApsMode = function () {
+ APmap = [];
+ $scope.example9data = [];
+ $scope.example9model = [];
+ $scope.example8data = [];
+ $scope.example8model = [];
+ _APs_IS_ON = false;
+ $scope.filterByMAC = false;
+ $scope.filterByMAN = false;
+ document.getElementById("APs-mode").classList.remove('quickaction-selected');
+ $scope.APsMode = false;
+ if (typeof (Storage) !== "undefined" && localStorage) { localStorage.setItem('APsMode', 'NO'); }
+ }
+
$scope.toggleFingerPrints = function () {
LOG.D2("toggleFingerPrints");
+ if (!$scope.anyService.hasSelectedFloor()) {
+ _warn_autohide($scope, "No floor selected (for fingerprints).")
+ return;
+ }
+
// if coverage and time are pressed, remove them when heatmaps are requested.
- if (_HEATMAP_FINGERPRINT_COVERAGE && $scope.fingerPrintsTimeMode) { //
+ if (_HEATMAP_FINGERPRINT_COVERAGE && $scope.fingerPrintsTimeMode) {
+ // is the logic here correct?
+ LOG.D2("coverage & time pressed");
$scope.toggleCoverage();
- $scope.toggleFingerPrints();
+ $scope.toggleFingerPrints(); // calling itself?!
return
}
- $scope.fingerPrintsMode = !$scope.fingerPrintsMode;
- if ($scope.fingerPrintsMode) {
- document.getElementById("fingerPrints-mode").classList.add('quickaction-selected');
- if (typeof (Storage) !== "undefined" && localStorage) {
- localStorage.setItem('fingerprintsMode', 'YES');
- }
+ if (!$scope.fingerPrintsMode) {
+ $scope.enableFingerprintsMode();
} else {
- document.getElementById("fingerPrints-mode").classList.remove('quickaction-selected');
- if (typeof (Storage) !== "undefined" && localStorage) {
- localStorage.setItem('fingerprintsMode', 'NO');
- }
+ $scope.disableFingerprintsMode();
}
var check = 0;
-
if (fingerPrintsMap[check] !== undefined && fingerPrintsMap[check] !== null) {
var i = fingerPrintsMap.length;
@@ -811,12 +796,9 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
document.getElementById("fingerPrints-time-mode").classList.remove('quickaction-selected');
}
return;
-
}
- if (heatmap && heatmap.getMap()) {
- //hide fingerPrints heatmap
-
+ if (heatmap && heatmap.getMap()) { // hide fingerPrints heatmap
heatmap.setMap(null);
_FINGERPRINTS_IS_ON = false;
document.getElementById("fingerPrints-mode").classList.remove('quickaction-selected');
@@ -834,9 +816,7 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
document.getElementById("fingerPrints-time-mode").classList.remove('quickaction-selected');
}
var i = heatmapFingerprints.length;
- while (i--) {
- heatmapFingerprints[i] = null;
- }
+ while (i--) { heatmapFingerprints[i] = null; }
heatmapFingerprints = [];
return;
}
@@ -859,11 +839,27 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
/**
+ * NOTE: the ACCES map functionality is now removed from the backend.
+ *
* This methods asynchronoysly calls showLocalizationAccHeatmap, that will
* eventually show the ACCES map. No UI changes should happen here as it returns immediately.
*
- * */
+ * It is a time consuming method that prepares in the background the access map.
+ * The code is buggy and based on obsolete Play/Scala libraries, so it was eventually removed.
+ *
+ */
$scope.toggleLocalizationAccuracy = function () {
+ if ((true)) { // ACCES is now removed. Show warning and disable when toggled
+ _warn_autohide($scope, WARN_ACCES_REMOVED)
+ $scope.localizationAccMode = false;
+ if (typeof (Storage) !== "undefined" && localStorage) {
+ localStorage.setItem('localizationAccMode', 'NO');
+ }
+ var el = document.getElementById("localizationAccuracy-mode")
+ el.classList.remove('quickaction-selected');
+ return;
+ }
+
var check = 0;
if ((heatMapAcces[check] !== undefined &&
heatMapAcces[check] !== null) ||
@@ -874,7 +870,6 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
heatMapAcces[i] = null;
}
heatMapAcces = [];
-
_HEATMAP_ACCES = false;
// CHECK what is this?
setColorClicked('g', false);
@@ -893,15 +888,19 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
}
$scope.showLocalizationAccHeatmap();
-
document.getElementById("localizationAccuracy-mode").classList.add('quickaction-selected');
- return;
};
$scope.toggleFingerPrintsTime = function () {
LOG.D2("toggleFingerPrintsTime");
- if ($scope.fingerPrintsMode) {
+ if (!$scope.anyService.hasSelectedFloor()) {
+ _warn_autohide($scope, "No floor selected (for fingerprints:time)")
+ return;
+ }
+
+ if ($scope.fingerPrintsMode) { // gmap heatmap mode (normal red/green/yellow maps heatmap)
+ LOG.D("fingerPrintsMode")
$scope.fingerPrintsTimeMode = !$scope.fingerPrintsTimeMode;
if ($scope.fingerPrintsTimeMode) {
if (typeof (Storage) !== "undefined" && localStorage) {
@@ -915,7 +914,8 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
$scope.anyService.fingerPrintsTimeMode = !$scope.anyService.fingerPrintsTimeMode;
}
- if ($scope.radioHeatmapRSSMode) {
+ if ($scope.radioHeatmapRSSMode) { // square boxes overlay (showing quality of coverate)
+ LOG.D("radioHeatmapRSSMode")
$scope.radioHeatmapRSSTimeMode = !$scope.radioHeatmapRSSTimeMode;
if ($scope.radioHeatmapRSSTimeMode) {
if (typeof (Storage) !== "undefined" && localStorage) {
@@ -930,6 +930,7 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
}
if ($scope.radioHeatmapLocalization) {
+ LOG.D("radioHeatmapLocalization")
clearLocalization();
$scope.showFingerprintCoverage();
$scope.radioHeatmapRSSMode = true;
@@ -942,6 +943,7 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
}
if (!$scope.fingerPrintsTimeMode && $scope.fingerPrintsMode) {
+ LOG.D("!fingerPrintsTimeMode && fingerPrintsMode: showFingerprintHeatmap")
clearFingerprintHeatmap();
$scope.showFingerprintHeatmap();
document.getElementById("fingerPrints-mode").classList.add('quickaction-selected');
@@ -949,6 +951,7 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
}
if (!$scope.radioHeatmapRSSTimeMode && $scope.radioHeatmapRSSMode) {
+ LOG.D("!radioHeatmapRSSTimeMode && radioHeatmapRSSMode")
clearFingerprintCoverage();
$scope.showFingerprintCoverage();
$scope.radioHeatmapRSSMode = true;
@@ -966,20 +969,22 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
};
$scope.togglePOIs = function () {
-
POIsMap = $scope.anyService.getAllPois();
var key = Object.keys(POIsMap);
var check = 0;
+ if (!$scope.anyService.hasSelectedFloor()) {
+ _warn_autohide($scope, "No floor selected (for POIs)")
+ return;
+ }
+
if (!POIsMap.hasOwnProperty(key[check])) {
- _err($scope, "No POIs yet.")
+ _warn_autohide($scope, "No POIs yet.")
return;
}
if (POIsMap[key[check]].marker.getMap() !== null && POIsMap[key[check]].marker.getMap() !== undefined) {
-
for (var key in POIsMap) {
if (POIsMap.hasOwnProperty(key)) {
-
var p = POIsMap[key];
if (p && p.marker) {
p.marker.setMap(null);
@@ -998,7 +1003,6 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
for (var key in POIsMap) {
if (POIsMap.hasOwnProperty(key)) {
-
var p = POIsMap[key];
if (p && p.marker) {
p.marker.setMap(GMapService.gmap);
@@ -1015,30 +1019,26 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
$scope.toggleConnections = function () {
-
connectionsMap = $scope.anyService.getAllConnections();
var key = Object.keys(connectionsMap);
var check = 0;
+ if (!$scope.anyService.hasSelectedFloor()) {
+ _warn_autohide($scope, "No floor selected (for edges)")
+ return;
+ }
if (!connectionsMap.hasOwnProperty(key[check])) {
- _warn_autohide($scope, "No edges yet.")
+ LOG.D2("No edges yet.")
return;
}
if (connectionsMap[key[check]].polyLine !== undefined) {
-
if (connectionsMap[key[check]].polyLine.getMap() !== undefined) {
if (connectionsMap[key[check]].polyLine.getMap() !== null) {
-
for (var key in connectionsMap) {
if (connectionsMap.hasOwnProperty(key)) {
-
var con = connectionsMap[key];
- if (con && con.polyLine) {
-
- con.polyLine.setMap(null);
- }
+ if (con && con.polyLine) { con.polyLine.setMap(null); }
}
-
}
$scope.anyService.setAllConnection(connectionsMap);
@@ -1057,10 +1057,8 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
$scope.getHeatMapButtonText = function () {
-
var check = 0;
return heatMap[check] !== undefined && heatMap[check] !== null ? "Hide WiFi Map" : "Show WiFi Map";
-
};
$scope.getAPsButtonText = function () {
@@ -1088,7 +1086,6 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
}
$scope.getPOIsButtonText = function () {
-
POIsMap = $scope.anyService.getAllPois();
var key = Object.keys(POIsMap);
var check = 0;
@@ -1104,7 +1101,6 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
document.getElementById("POIs-mode").classList.remove('quickaction-selected');
$scope.POIsMode = false;
return "Show POIs";
-
};
$scope.getConnectionsButtonText = function () {
@@ -1655,7 +1651,7 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
$cookieStore.put('RSSClicked', 'YES');
},
function (resp) {
- ShowError($scope, resp, "Something went wrong while fetching radio heatmap.", true);
+ ShowWarningAutohide($scope, resp, "", false);
if (!$scope.radioHeatmapRSSTimeMode) {
$scope.radioHeatmapRSSMode = false;
if (typeof (Storage) !== "undefined" && localStorage && !$scope.fingerPrintsTimeMode) {
@@ -1707,29 +1703,18 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
ShowError($scope, resp, "Something went wrong while fetching the ids of access points.", true);
}
);
-
-
};
-
- $scope.showAPs = function () {
- //request for access points
+ $scope.showAPs = function () { // request for access points
var jsonReq = {"buid": $scope.anyService.getBuildingId(), "floor": $scope.anyService.getFloorNumber()};
- jsonReq.username = $scope.creds.username;
- jsonReq.password = $scope.creds.password;
-
var i;
-
var promise = $scope.anyAPI.getAPs(jsonReq);
promise.then(
- function (resp) {
- // on success
-
+ function (resp) { // on success
i = resp.data.accessPoints.length;
-
if (i <= 0) {
- _warn_autohide($scope, "This floor seems not to be Access Point mapped. Download the Anyplace app from the Google Play store to map the floor.");
+ _warn_autohide($scope, "Floor not mapped. Use logger to map it");
$scope.APsMode = false;
document.getElementById("APs-mode").classList.remove('quickaction-selected');
return;
@@ -1760,13 +1745,11 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
} else {
x = values[i].x;
y = values[i].y;
-
}
+
$scope.example9data.push({id: values[i].AP, label: values[i].AP});
$scope.example9model.push({id: values[i].AP, label: values[i].AP});
- //alert("x: "+x+" y: "+y);
-
var accessPoint = new google.maps.Marker({
id: values[i].AP,
position: new google.maps.LatLng(x, y),
@@ -1781,34 +1764,26 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
)
});
- APmap.push(
- accessPoint
- );
-
+ APmap.push(accessPoint);
jsonInfo.push(accessPoint.id);
-
var infowindow = new google.maps.InfoWindow();
if (!infowindow.getMap()) {
APmap[c].addListener('click', function () {
-
if (this.mun !== "N/A") {
infowindow.setContent(this.id + "- " + this.mun);
} else {
infowindow.setContent(this.id);
}
-
infowindow.open(this.gmap, this);
});
}
-
-
c++;
}
$scope.getAPsIds(jsonInfo);
},
function (resp) {
$scope.APsMode = false;
- ShowError($scope, resp, 'Something went wrong while fetching Access Points.', true);
+ ShowError($scope, resp, 'Can\'t fetch Access Points:', true);
document.getElementById("APs-mode").classList.remove('quickaction-selected');
}
);
@@ -1833,12 +1808,29 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
initializeTimeFunction();
},
function (resp) {
- console.log(ERR_FETCH_FINGERPRINTS + ": timestamp.");
- // ShowError($scope, resp, ERR_FETCH_FINGERPRINTS + ": timestamp.", true);
+ LOG.W(ERR_FETCH_FINGERPRINTS + " (getFingerPrintsTime)");
+ $scope.disableFingerprintsMode();
+ ShowWarningAutohide($scope, resp, "", false);
}
);
};
+ $scope.enableFingerprintsMode = function () {
+ document.getElementById("fingerPrints-mode").classList.add('quickaction-selected');
+ $scope.fingerPrintsMode = true;
+ if (typeof (Storage) !== "undefined" && localStorage) {
+ localStorage.setItem('fingerprintsMode', 'YES');
+ }
+ }
+
+ $scope.disableFingerprintsMode = function () {
+ document.getElementById("fingerPrints-mode").classList.remove('quickaction-selected');
+ $scope.fingerPrintsMode = false;
+ if (typeof (Storage) !== "undefined" && localStorage) {
+ localStorage.setItem('fingerprintsMode', 'NO');
+ }
+ }
+
/**
*
* Shows Google Maps Heatmap for fingerprints
@@ -1895,15 +1887,9 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
_FINGERPRINTS_IS_ON = true;
},
function (resp) {
- console.log(ERR_FETCH_FINGERPRINTS + ": timestamp.");
- // ShowError($scope, resp, ERR_FETCH_FINGERPRINTS, true);
- if (!$scope.fingerPrintsMode) {
- document.getElementById("fingerPrints-mode").classList.remove('quickaction-selected');
- $scope.fingerPrintsMode = false;
- if (typeof (Storage) !== "undefined" && localStorage) {
- localStorage.setItem('fingerprintsMode', 'NO');
- }
- }
+ LOG.E(ERR_FETCH_FINGERPRINTS + ": showFingerprintHeatmap (disabling option).");
+ $scope.disableFingerprintsMode();
+ ShowWarningAutohide($scope, resp, "", false);
}
);
return null;
@@ -1959,14 +1945,8 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
},
function (resp) {
console.log(ERR_FETCH_FINGERPRINTS + ": timestamp.");
- // ShowError($scope, resp, ERR_FETCH_FINGERPRINTS, true);
- if (!$scope.fingerPrintsMode) {
- document.getElementById("fingerPrints-mode").classList.remove('quickaction-selected');
- $scope.fingerPrintsMode = false;
- if (typeof (Storage) !== "undefined" && localStorage) {
- localStorage.setItem('fingerprintsMode', 'NO');
- }
- }
+ $scope.disableFingerprintsMode();
+ ShowWarningAutohide($scope, resp, "", false);
}
);
var url = null;
@@ -2042,14 +2022,8 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
},
function (resp) {
console.log(ERR_FETCH_FINGERPRINTS + ": timestamp.");
- // ShowError($scope, resp, ERR_FETCH_FINGERPRINTS, true);
- if (!$scope.fingerPrintsMode) {
- document.getElementById("fingerPrints-mode").classList.remove('quickaction-selected');
- $scope.fingerPrintsMode = false;
- if (typeof (Storage) !== "undefined" && localStorage) {
- localStorage.setItem('fingerprintsMode', 'NO');
- }
- }
+ $scope.disableFingerprintsMode();
+ ShowWarningAutohide($scope, resp, "", false);
}
);
}
@@ -2073,14 +2047,7 @@ app.controller('WiFiController', ['$cookieStore', '$scope', 'AnyplaceService', '
laButton.prop('disabled', true);
laButtonProgress.removeClass("hidden");
- jsonReq.username = $scope.creds.username;
- jsonReq.password = $scope.creds.password;
-
var promise = $scope.anyAPI.getHeatmapAcces(jsonReq); // ACCES is removed
- if ((true)) {
- _warn_autohide($scope, WARN_ACCES_REMOVED)
- return;
- }
var circleRadius = 1.5;
// zoom
diff --git a/server/public/anyplace_architect/index.html b/server/public/anyplace_architect/index.html
index a58c705e0..57c9ec3fc 100644
--- a/server/public/anyplace_architect/index.html
+++ b/server/public/anyplace_architect/index.html
@@ -17,7 +17,8 @@
-
+
+
-
+
Spaces
@@ -336,15 +305,13 @@
-
WARNING : Once you click the delete button below, every floor, POI and
- connection
- that is attached to the indoor space{{anyService.getBuildingName()}} will be
- lost
- PERMANENTLY.
+
WARNING: Once you confirm, all floors, POIs and connections
+
that relate to {{anyService.getBuildingName()}} will be
+ lost PERMANENTLY.
+
Confirm
Deletion
-
@@ -722,6 +689,12 @@
+
+
+ Overlay Mode
+
+
• Keeps the previous floorplan to help align the new one.
+
@@ -732,11 +705,12 @@
- Note:
- Zooming in the map as much as possible while placing the floor plan
-
-
- will result to better image quality.
+
NOTES:
+
+
+
+
• Use high zoom level to improve placement accuracy.
+
• Zoom level affects real-life size of the floorplan.
@@ -1235,6 +1209,7 @@
Wi-Fi:
+