2016-07-06 22:52:31 +02:00
|
|
|
'use strict';
|
|
|
|
angular.module('config', [])
|
|
|
|
.factory('config', function() {
|
|
|
|
return {
|
2016-07-09 02:58:47 +02:00
|
|
|
api: 'https://mgmt.ffhb.de/api',
|
2016-07-06 22:52:31 +02:00
|
|
|
map: {
|
2016-07-09 10:15:03 +02:00
|
|
|
view: {lat: 53.0702, lng: 8.815, zoom: 16},
|
2016-07-15 13:55:52 +02:00
|
|
|
maxZoom: 19,
|
|
|
|
tileLayer: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
2016-07-14 19:29:05 +02:00
|
|
|
heatMax: {
|
2016-07-15 13:55:52 +02:00
|
|
|
wifi24: 15,
|
|
|
|
wifi5: 50
|
2016-07-14 19:29:05 +02:00
|
|
|
},
|
2016-07-14 14:04:51 +02:00
|
|
|
icon:{
|
|
|
|
warn:{wifi24:20,wifi5:20},
|
|
|
|
crit:{wifi24:30,wifi5:30}
|
|
|
|
},
|
2016-07-09 10:15:03 +02:00
|
|
|
geojson: {
|
|
|
|
pointToLayer: function (feature, latlng){
|
|
|
|
feature.properties.radius = 10;
|
|
|
|
return L.circleMarker(latlng, feature.properties);
|
|
|
|
},
|
|
|
|
onEachFeature: function(feature, layer) {
|
|
|
|
if(feature.properties.name.length >0){
|
|
|
|
layer.bindLabel(feature.properties.name);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
style: function(feature){
|
|
|
|
if(feature.geometry.type === 'LineString' || feature.geometry.type === 'Polygon'){
|
|
|
|
return {color: feature.properties.stroke,
|
|
|
|
opacity:feature.properties['stroke-opacity'],
|
|
|
|
fillColor: feature.properties.fill,
|
|
|
|
fillOpacity:feature.properties['fill-opacity'],
|
|
|
|
stroke: true,
|
|
|
|
weight: feature.properties['stroke-width'],
|
|
|
|
lineCap: 'round',
|
|
|
|
lineJoin: 'round'};
|
|
|
|
}
|
|
|
|
return {
|
|
|
|
color: feature.properties['marker-color'],
|
|
|
|
fillColor: feature.properties['marker-color'],
|
|
|
|
fillOpacity: 0.2,
|
|
|
|
weight: 2,
|
|
|
|
stroke: true
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2016-07-06 22:52:31 +02:00
|
|
|
},
|
2016-07-12 18:29:02 +02:00
|
|
|
geojson: 'https://mgmt.ffhb.de/meshviewer.geojson',
|
2016-07-14 14:04:51 +02:00
|
|
|
refresh: 15000
|
2016-07-06 22:52:31 +02:00
|
|
|
};
|
|
|
|
});
|