From eeceb3a1676102b22b3c7ec905b4e9e2fed5f59d Mon Sep 17 00:00:00 2001 From: Fabian Bartschke Date: Sat, 9 Jun 2018 10:01:45 +0200 Subject: [PATCH 1/7] make: Adjust openlayers URL --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3fe6c27..bc40efa 100644 --- a/Makefile +++ b/Makefile @@ -18,9 +18,9 @@ clean-deploy: # OpenLayers OPENLAYERS_VERSION = 2.13.1 -OPENLAYERS_NAME = OpenLayers-$(OPENLAYERS_VERSION) +OPENLAYERS_NAME = openlayers-$(OPENLAYERS_VERSION) OPENLAYERS_ARCHIVE = $(OPENLAYERS_NAME).tar.gz -OPENLAYERS_URL = http://github.com/openlayers/openlayers/releases/download/release-$(OPENLAYERS_VERSION)/$(OPENLAYERS_ARCHIVE) +OPENLAYERS_URL = https://github.com/openlayers/openlayers/archive/v$(OPENLAYERS_VERSION).tar.gz OPENLAYERS_JS_FOLDER = $(JS_FOLDER)/OpenLayers OPENLAYERS_IMG_FOLDER = $(IMG_FOLDER)/OpenLayers From 798db55e288e1695f559093ae50e49ed7008332b Mon Sep 17 00:00:00 2001 From: Fabian Bartschke Date: Sat, 9 Jun 2018 10:06:42 +0200 Subject: [PATCH 2/7] make: update mootools URLs --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index bc40efa..3cb0fe7 100644 --- a/Makefile +++ b/Makefile @@ -38,12 +38,13 @@ $(DOWNLOAD_FOLDER)/$(OPENLAYERS_ARCHIVE): # MooTools +# http://ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools.js MOOTOOLS_CORE_VERSION = 1.4.5 -MOOTOOLS_CORE_FILE = mootools-core-$(MOOTOOLS_CORE_VERSION)-full-compat.js -MOOTOOLS_CORE_URL = http://mootools.net/download/get/$(MOOTOOLS_CORE_FILE) +MOOTOOLS_CORE_FILE = mootools.js +MOOTOOLS_CORE_URL = http://ajax.googleapis.com/ajax/libs/mootools/$(MOOTOOLS_CORE_VERSION)/$(MOOTOOLS_CORE_FILE) MOOTOOLS_MORE_VERSION = 1.4.0.1 -MOOTOOLS_MORE_ARCHIVE = $(MOOTOOLS_MORE_VERSION).tar.gz +MOOTOOLS_MORE_ARCHIVE = mootools-more-$(MOOTOOLS_MORE_VERSION).tar.gz MOOTOOLS_MORE_URL = https://github.com/mootools/mootools-more/archive/$(MOOTOOLS_MORE_ARCHIVE) MOOTOOLS_MORE_FOLDER = $(DOWNLOAD_FOLDER)/mootools-more-$(MOOTOOLS_MORE_VERSION) MOOTOOLS_MORE_COMPONENTS = \ From 9a784d8d36654072cb8c4e0a9fa9c68a7d739004 Mon Sep 17 00:00:00 2001 From: Fabian Bartschke Date: Sat, 9 Jun 2018 10:09:37 +0200 Subject: [PATCH 3/7] waypoints: update WELT2000 URL --- prosoar/waypoints/welt2000.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prosoar/waypoints/welt2000.py b/prosoar/waypoints/welt2000.py index 89091dc..46fd326 100644 --- a/prosoar/waypoints/welt2000.py +++ b/prosoar/waypoints/welt2000.py @@ -15,7 +15,7 @@ def __get_database_file(dir_data): # Download the current file # (only if server file is newer than local file) - url = 'http://www.segelflug.de/vereine/welt2000/download/WELT2000.TXT' + url = 'https://raw.githubusercontent.com/skylines-project/welt2000/master/WELT2000.TXT' subprocess.check_call(['wget', '-N', '-P', os.path.dirname(path), url]) # Check if download succeeded From 4cd0d54141aa44b5ad85a3cf556ba6eaf352a88c Mon Sep 17 00:00:00 2001 From: Fabian Bartschke Date: Sat, 9 Jun 2018 10:11:20 +0200 Subject: [PATCH 4/7] map.js: update URL for hillshading tiles see https://wiki.openstreetmap.org/wiki/Tile_servers --- web_dev/js/proSoar/map.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/web_dev/js/proSoar/map.js b/web_dev/js/proSoar/map.js index 140bb71..6d4b427 100644 --- a/web_dev/js/proSoar/map.js +++ b/web_dev/js/proSoar/map.js @@ -56,36 +56,13 @@ var MapWindow = new Class({ this.epsg4326 = new OpenLayers.Projection("EPSG:4326"); var hillshading = new OpenLayers.Layer.XYZ(_("Hill shading"), - "http://toolserver.org/~cmarqu/hill/${z}/${x}/${y}.png", { -// "terrain/${z}/${x}/${y}.png", { + "http://c.tiles.wmflabs.org/hillshading/${z}/${x}/${y}.png", { isBaseLayer: false, sphericalMercator: true, transparent: true, 'visibility': true, 'displayInLayerSwitcher': false, }); - -/* - var hillshading = new OpenLayers.Layer.TMS(_("Hill shading"), -// "http://toolserver.org/~cmarqu/hill/", { - "terrain/", { - type: 'png', - getURL: function osm_getTileURL(bounds) { - var res = this.map.getResolution(); - var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w)); - var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); - var z = this.map.getZoom(); - var limit = Math.pow(2, z); - if (y < 0 || y >= limit) return OpenLayers.Util.getImagesLocation() + "404.png"; - else x = ((x % limit) + limit) % limit; - return this.url + z + "/" + x + "/" + y + "." + this.type; - }, - isBaseLayer: false, - transparent: true, - 'visibility': true, - 'displayInLayerSwitcher': false, - }); -*/ this.map.addLayer(hillshading); osm.events.register('visibilitychanged', this, function() { hillshading.setVisibility(osm.getVisibility()); }); From 83eed35ddb1eedd408d0678eba285ebcf437ef67 Mon Sep 17 00:00:00 2001 From: Fabian Bartschke Date: Sat, 16 Jun 2018 15:04:09 +0200 Subject: [PATCH 5/7] shebang: python2.7 --- deploy/deploy.py | 2 +- manage.py | 2 +- prosoar/igc/trace.py | 2 +- scripts/cleanup_prosoar | 2 +- scripts/gen_airports | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/deploy.py b/deploy/deploy.py index 45572e5..e908591 100755 --- a/deploy/deploy.py +++ b/deploy/deploy.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2.7 import sys import os diff --git a/manage.py b/manage.py index d7e0f02..7006dd8 100755 --- a/manage.py +++ b/manage.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2.7 from flask.ext.script import Manager diff --git a/prosoar/igc/trace.py b/prosoar/igc/trace.py index 10dc4fc..4f46725 100644 --- a/prosoar/igc/trace.py +++ b/prosoar/igc/trace.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2.7 from pyproj import Proj, transform import math diff --git a/scripts/cleanup_prosoar b/scripts/cleanup_prosoar index 9f0fbe6..f34784d 100755 --- a/scripts/cleanup_prosoar +++ b/scripts/cleanup_prosoar @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2.7 import os import sys diff --git a/scripts/gen_airports b/scripts/gen_airports index 01bb569..27f43b5 100755 --- a/scripts/gen_airports +++ b/scripts/gen_airports @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2.7 import os import sys From f3a7afbc6374167963c96c3e0c5b5924dedc434c Mon Sep 17 00:00:00 2001 From: Fabian Bartschke Date: Sat, 16 Jun 2018 15:56:38 +0200 Subject: [PATCH 6/7] map.js: update URL for skylines tile server --- web_dev/js/proSoar/map.js | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/web_dev/js/proSoar/map.js b/web_dev/js/proSoar/map.js index 6d4b427..5068098 100644 --- a/web_dev/js/proSoar/map.js +++ b/web_dev/js/proSoar/map.js @@ -68,33 +68,12 @@ var MapWindow = new Class({ osm.events.register('visibilitychanged', this, function() { hillshading.setVisibility(osm.getVisibility()); }); var airspace = new OpenLayers.Layer.XYZ(_("Airspace"), - "https://www.skylines-project.org/mapproxy/tiles/1.0.0/airspace/${z}/${x}/${y}.png", { + "https://www.skylines.aero/mapproxy/tiles/1.0.0/airspace/${z}/${x}/${y}.png", { isBaseLayer: false, transparent: true, 'visibility': true, 'displayInLayerSwitcher': true }); - -/* - var airspace = new OpenLayers.Layer.TMS(_("Airspace"), - "airspace/", { - type: 'png', - getURL: function osm_getTileURL(bounds) { - var res = this.map.getResolution(); - var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w)); - var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); - var z = this.map.getZoom(); - var limit = Math.pow(2, z); - if (y < 0 || y >= limit) return OpenLayers.Util.getImagesLocation() + "404.png"; - else x = ((x % limit) + limit) % limit; - return this.url + z + "/" + x + "/" + y + "." + this.type; - }, - isBaseLayer: false, - transparent: true, - 'visibility': true, - 'displayInLayerSwitcher': true - }); -*/ this.map.addLayer(airspace); OpenLayers.Feature.Vector.style['default']['strokeWidth'] = '4'; From ae26d9594484842440a827f25c4393eb976ba6bc Mon Sep 17 00:00:00 2001 From: Fabian Bartschke Date: Sun, 17 Jun 2018 13:34:16 +0200 Subject: [PATCH 7/7] Template: fix gettext problem No link tag is inserted if 'en' is preferred locale. related to #18 and #19 --- prosoar/templates/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prosoar/templates/index.html b/prosoar/templates/index.html index 59ac51d..8b6ec65 100644 --- a/prosoar/templates/index.html +++ b/prosoar/templates/index.html @@ -9,8 +9,10 @@ + {% if get_locale() != 'en'%} - + + {% endif %}