forked from fruskac/map-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.controller.js
More file actions
41 lines (32 loc) · 1.15 KB
/
Copy pathapp.controller.js
File metadata and controls
41 lines (32 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
angular.module('app').controller('AppCtrl', [
'$scope',
'$location',
'$window',
function ($scope, $location, $window) {
document.getElementById('map').onload = function () {
var FruskacMap = document.getElementById('map').contentWindow.fruskac;
new FruskacMap({
lang: CONFIG_LANG,
fullscreen: CONFIG_FULLSCREEN,
clustering: CONFIG_CLUSTERING,
data: CONFIG_DATA
}).ready(function () {
var self = this;
$scope.$apply(function () {
$scope.ready = true;
$scope.data = self.getData();
$scope.clustering = self.clustering;
$scope.type = self.type;
$scope.loaded = true;
$scope.highlight = function (item, category) {
item.highlightedCategory = category;
item.highlight(category);
}
})
});
};
if ($window.innerWidth > 768) {
$scope.navigationOpen = true;
}
}
]);