2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-24 16:21:53 +00:00

re-enable /map/tools/

This commit is contained in:
Philip Sargent 2023-11-14 19:43:49 +02:00
parent 680477d2d5
commit 7b67eb52dc
3 changed files with 6 additions and 2 deletions

View File

@ -312,7 +312,7 @@ def find_nearest_point(points, target_point):
"""Returns the nearest point to a target point from a list of points.
TODO FIND OUT
1. is this SRTM data ?
1. is this SRTM data ? TICK. Yes.
2. what is the zero altitude datum? Geoid or ellisoid ? Do we need to subtract 47m ??
In our dataset, the survey stations are all within 30m of an srtm reference point.
@ -361,6 +361,9 @@ def find_nearest_point(points, target_point):
; TerrainTool (c) 2008 - 2012 Mike McCombe
"""
#let raw = [[406264.72, 5278037.57, 873.53],
#first version:
#rawheights = [[406264.72, 5278037.57, 873.53],
rawheights = [[406264.72, 5278037.57, 873.53],
[406314.69, 5278036.50, 861.60],
[406364.66, 5278035.43, 852.51],

View File

@ -68,6 +68,7 @@ def map(request):
def mapfile(request, path):
"""Serves unadorned file: everything in the /map/... folder tree"""
fn = Path(settings.EXPOWEB, "map", path)
print(f"MAP cuttout. \n{path=}\n{fn=} mime:{getmimetype(fn)}")
return HttpResponse(content=open(fn, "r"), content_type=getmimetype(fn))

View File

@ -237,7 +237,7 @@ trogglepatterns = [
# 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'^map/slippy/map.html', map, name="map"), # Redirects to OpenStreetMap JavaScript. NOT WORKING
re_path(r'^map/slippy/(?P<path>.*)$', mapfile, name="mapfile"), # css, js, gpx. NOT WORKING
re_path(r'^map/(?P<path>.*)$', mapfile, name="mapfile"), # css, js, gpx. working. This does not add any troggle menus or headers
# 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