Commit 2a2d4b19 authored by Elena Grassi's avatar Elena Grassi
Browse files

[wgn] switched all pilot sites to our tileserver / added tou/privacy links in the footer

parent 418a4f2a
......@@ -530,10 +530,10 @@
"zoom_level": 14,
"cluster_limit": 18,
"max_zoom": 18,
"tile_view": "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png",
"tile_view_attribution": "Tiles and Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>.",
"tile_edit": "http://b.tile.stamen.com/toner/{z}/{x}/{y}.png",
"tile_edit_attribution": "Map tiles by <a href='http://stamen.com'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>."
"tile_view" : "http://devtiles.firstlife.org/styles/osm-bright/{z}/{x}/{y}.png",
"tile_view_attribution": "Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>. <a target='_blank' href='https://sandona.wegovnow.eu/assets/pdf/privacy-sandona.pdf'>Privacy Statement</a> and <a target='_blank' href='https://sandona.wegovnow.eu/assets/pdf/tou-sandona.pdf'>TOU</a>.",
"tile_edit" : "http://devtiles.firstlife.org/styles/osm-bright/{z}/{x}/{y}.png",
"tile_edit_attribution": "Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>. <a target='_blank' href='https://sandona.wegovnow.eu/assets/pdf/privacy-sandona.pdf'>Privacy Statement</a> and <a target='_blank' href='https://sandona.wegovnow.eu/assets/pdf/tou-sandona.pdf'>TOU</a>."
},
"behaviour": {
"is_login_required": false,
......
......@@ -572,10 +572,10 @@
"map": {
"map_default_lat": 51.497870,
"map_default_lng": -0.079565,
"tile_view": "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png",
"tile_view_attribution": "Tiles and Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>.",
"tile_edit": "http://b.tile.stamen.com/toner/{z}/{x}/{y}.png",
"tile_edit_attribution": "Map tiles by <a href='http://stamen.com'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>.",
"tile_view" : "http://devtiles.firstlife.org/styles/osm-bright/{z}/{x}/{y}.png",
"tile_view_attribution": "Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>. <a target='_blank' href='https://southwark.liquidfeedback.net/static/wegovnow/southwark/privacy.pdf'>Privacy Statement</a> and <a target='_blank' href='https://southwark.liquidfeedback.net/static/wegovnow/southwark/terms_of_use.pdf'>TOU</a>.",
"tile_edit" : "http://devtiles.firstlife.org/styles/osm-bright/{z}/{x}/{y}.png",
"tile_edit_attribution": "Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>. <a target='_blank' href='https://southwark.liquidfeedback.net/static/wegovnow/southwark/privacy.pdf'>Privacy Statement</a> and <a target='_blank' href='https://southwark.liquidfeedback.net/static/wegovnow/southwark/terms_of_use.pdf'>TOU</a>.",
"zoom_level": 14,
"cluster_limit": 18,
"max_zoom": 18
......
......@@ -539,10 +539,10 @@
"zoom_level": 14,
"cluster_limit": 18,
"max_zoom": 18,
"tile_view": "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png",
"tile_view_attribution": "Tiles and Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>.",
"tile_edit": "http://b.tile.stamen.com/toner/{z}/{x}/{y}.png",
"tile_edit_attribution": "Map tiles by <a href='http://stamen.com'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>.",
"tile_view" : "http://devtiles.firstlife.org/styles/osm-bright/{z}/{x}/{y}.png",
"tile_view_attribution": "Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>. <a target='_blank' href='https://torino.wegovnow.eu/assets/pdf/privacy-torino.pdf'>Privacy Statement</a> and <a target='_blank' href='https://torino.wegovnow.eu/assets/pdf/tou-torino.pdf'>TOU</a>.",
"tile_edit" : "http://devtiles.firstlife.org/styles/osm-bright/{z}/{x}/{y}.png",
"tile_edit_attribution": "Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright'>ODbL</a>. <a target='_blank' href='https://torino.wegovnow.eu/assets/pdf/privacy-torino.pdf'>Privacy Statement</a> and <a target='_blank' href='https://torino.wegovnow.eu/assets/pdf/tou-torino.pdf'>TOU</a>.",
"tile_vector": "https://tiles.firstlife.org/tile/{z}/{x}/{y}",
"scales": {
"22": {
......
......@@ -948,6 +948,7 @@ angular.module('firstlife.controllers')
}]).run(function (myConfig, $timeout, $log) {
// VODKA here base tile
self.map = {
loaded: false,
layers: {
......
......@@ -10,7 +10,7 @@ angular.module('firstlife.directives').directive('flmap',function () {
getUserLocation: '=getuserlocation'
},
templateUrl:'/templates/map/flmap.html',
controller: ['$scope','$log', '$location', '$timeout', '$translate', 'myConfig','ThingsService', 'leafletData', 'PlatformService', 'ThingsFact', function ($scope, $log, $location,$timeout,$translate, myConfig, ThingsService, leafletData, PlatformService, ThingsFact) {
controller: ['$scope','$log', '$location', '$timeout', '$translate', 'myConfig','ThingsService', 'leafletData', 'PlatformService', 'ThingsFact', 'LogsFactory', function ($scope, $log, $location,$timeout,$translate, myConfig, ThingsService, leafletData, PlatformService, ThingsFact, LogsFactory) {
$scope.embed = $location.search().embed || false;
$scope.config = myConfig;
......@@ -27,6 +27,10 @@ angular.module('firstlife.directives').directive('flmap',function () {
var triesLimit = 5;
var tries = 0;
// We accept up to 10 tile errors then we start signaling to slack
var tileErrors = 0;
var maxTileErrors = 10;
// We need icons for the nearby list of entities.
var defIcons = $scope.config.types.icons;
//var types = $scope.config.types.keys;
......@@ -377,6 +381,7 @@ angular.module('firstlife.directives').directive('flmap',function () {
// listners al livello tile
leafletData.getLayers().then(
function (layers) {
// $log.debug('flmap layers',layers.overlays.pie);
// salvo il riferimento all'overlay
pieRef = layers.overlays.pie;
......@@ -399,6 +404,14 @@ angular.module('firstlife.directives').directive('flmap',function () {
// $log.debug('tileunload',e.coords);
removeTile(e.coords);
});
$scope.tileLayer.on('tileerror', function(e) {
tileErrors++;
if (tileErrors > maxTileErrors) {
LogsFactory.error('Tileserver ' + $scope.config.map.tile_view + ' seems to have died');
$log.error('TILEERROR', e);
}
});
}
}
);
......@@ -937,6 +950,7 @@ angular.module('firstlife.directives').directive('flmap',function () {
}
function addEditLayers() {
// VODKA HERE edit loading tiles
editLayer = L.tileLayer($scope.map.layers.baselayers.edit.url, $scope.map.layers.baselayers.edit.layerOptions);
// $log.debug(editLayer);
// add tile layer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment