mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-28 18:11:52 +00:00
Make maps an 'unvarnished' url
This commit is contained in:
parent
ca289afe68
commit
08c56644eb
@ -344,6 +344,21 @@ def find_nearest_point(points, target_point):
|
|||||||
nearest_distance = math.sqrt(nearest_distance_squared)
|
nearest_distance = math.sqrt(nearest_distance_squared)
|
||||||
return nearest_point_alt, nearest_distance
|
return nearest_point_alt, nearest_distance
|
||||||
|
|
||||||
|
# This data was extarcted by Radost:
|
||||||
|
# The original source of heights (and positions is the file)
|
||||||
|
# loser/surface/terrain/SRTM-7x9-M31-482-279-offset.svx
|
||||||
|
"""
|
||||||
|
; Survex terrain data created by TerrainTool version 1.12a from Shuttle Radar Topography Mission data
|
||||||
|
; SRTM DEM data is public-domain.
|
||||||
|
; Used coordinate system AustrianM31 with ellipsoid "Bessel 1841" and datum "MGI Datum (Austria)"
|
||||||
|
; Grid centred at XXX 488000 283750
|
||||||
|
; Lat/Long of centre = 47.691318 13.838777 ( 13 E 50' 19.6" 47 N 41' 28.7") relative to WGS84/GRS80 datum
|
||||||
|
; Grid convergence at centre = -0.374 degrees ( 0 W 22' 27.9")
|
||||||
|
; Point scale factor at centre = 1.0000177
|
||||||
|
; Output offset by adding (-450000.00,-200000.00, 0.00) to calculated results;
|
||||||
|
; TerrainTool (c) 2008 - 2012 Mike McCombe
|
||||||
|
"""
|
||||||
|
#let raw = [[406264.72, 5278037.57, 873.53],
|
||||||
rawheights = [[406264.72, 5278037.57, 873.53],
|
rawheights = [[406264.72, 5278037.57, 873.53],
|
||||||
[406314.69, 5278036.50, 861.60],
|
[406314.69, 5278036.50, 861.60],
|
||||||
[406364.66, 5278035.43, 852.51],
|
[406364.66, 5278035.43, 852.51],
|
||||||
|
@ -60,13 +60,13 @@ def spider(request, _):
|
|||||||
return redirect("/?#") # so that suffixes applied by spider are no longer part of the url
|
return redirect("/?#") # so that suffixes applied by spider are no longer part of the url
|
||||||
|
|
||||||
def map(request):
|
def map(request):
|
||||||
"""Serves unadorned the expoweb/map/map.html file"""
|
"""Serves unadorned the expoweb/map/slippy/map.html file"""
|
||||||
fn = Path(settings.EXPOWEB, "map", "map.html")
|
fn = Path(settings.EXPOWEB, "map", "slippy", "map.html")
|
||||||
return HttpResponse(content=open(fn, "r"), content_type="text/html")
|
return HttpResponse(content=open(fn, "r"), content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
def mapfile(request, path):
|
def mapfile(request, path):
|
||||||
"""Serves unadorned file"""
|
"""Serves unadorned file: everything in the /map/... folder tree"""
|
||||||
fn = Path(settings.EXPOWEB, "map", path)
|
fn = Path(settings.EXPOWEB, "map", path)
|
||||||
return HttpResponse(content=open(fn, "r"), content_type=getmimetype(fn))
|
return HttpResponse(content=open(fn, "r"), content_type=getmimetype(fn))
|
||||||
|
|
||||||
|
4
urls.py
4
urls.py
@ -236,8 +236,8 @@ trogglepatterns = [
|
|||||||
|
|
||||||
# This next set are all intercepted by Apache, if it is running, with no problem.
|
# This next set are all intercepted by Apache, if it is running, with no problem.
|
||||||
re_path(r'^photos/(?P<subpath>.*)$', mediapage, {'doc_root': settings.PHOTOS_ROOT}, name="mediapage"), # photo galleries
|
re_path(r'^photos/(?P<subpath>.*)$', mediapage, {'doc_root': settings.PHOTOS_ROOT}, name="mediapage"), # photo galleries
|
||||||
re_path(r'^map/map.html', map, name="map"), # Redirects to OpenStreetMap JavaScript. NOT WORKING
|
re_path(r'^map/slippy/map.html', map, name="map"), # Redirects to OpenStreetMap JavaScript. NOT WORKING
|
||||||
re_path(r'^map/(?P<path>.*)$', mapfile, name="mapfile"), # css, js, gpx. NOT WORKING
|
re_path(r'^map/slippy/(?P<path>.*)$', mapfile, name="mapfile"), # css, js, gpx. NOT WORKING
|
||||||
|
|
||||||
# This next set are all intercepted by Apache, if it is running, AND troggle must manage these,
|
# This next set are all intercepted by Apache, if it is running, AND troggle must manage these,
|
||||||
# even though the code is not in the troggle repo
|
# even though the code is not in the troggle repo
|
||||||
|
Loading…
Reference in New Issue
Block a user