Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes #28

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 = \
Expand Down
2 changes: 1 addition & 1 deletion deploy/deploy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7

import sys
import os
Expand Down
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7

from flask.ext.script import Manager

Expand Down
2 changes: 1 addition & 1 deletion prosoar/igc/trace.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7

from pyproj import Proj, transform
import math
Expand Down
4 changes: 3 additions & 1 deletion prosoar/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@

<script type="text/javascript" src="js/MooTools/mootools-core.js"></script>
<script type="text/javascript" src="js/MooTools/mootools-more.js"></script>
{% if get_locale() != 'en'%}

<link rel="gettext" href="LC_MESSAGES/{{ get_locale() }}.json" />
<link rel="gettext" href="LC_MESSAGES/{{ get_locale() }}.json" />
{% endif %}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding en.json (#19), just dont put anything here for english language, as all strings are already in english by default. Works for me™ 😄

<script type="text/javascript" src="settings/initial.js"></script>

Expand Down
2 changes: 1 addition & 1 deletion prosoar/waypoints/welt2000.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/cleanup_prosoar
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7

import os
import sys
Expand Down
2 changes: 1 addition & 1 deletion scripts/gen_airports
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7

import os
import sys
Expand Down
48 changes: 2 additions & 46 deletions web_dev/js/proSoar/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,68 +56,24 @@ 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()); });

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';
Expand Down