From 4ad7033285945243d48d9c13e853996cd864b40a Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Fri, 16 Apr 2021 21:47:40 +0100 Subject: [PATCH] working, but very faint --- core/views/prospect.py | 26 +++++++++++++------------- templates/prospecting.html | 12 ++++++++++++ 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/core/views/prospect.py b/core/views/prospect.py index 34f875b..f7e10aa 100644 --- a/core/views/prospect.py +++ b/core/views/prospect.py @@ -107,7 +107,7 @@ class MapLocations(object): # Parameters for big map and zoomed subarea maps: # big map first (zoom factor ignored) -# These are the values for the url? /prospecting/[mapcode].png ?? +# These are the values for the url /prospecting/[mapcode].png maps = { # id left top right bottom zoom @@ -210,23 +210,23 @@ def plot(surveypoint, number, point_type, label, mapcode, draw, img): def prospecting_image(request, name): # We should replace all this with something that exports an overlay for Google Maps and OpenStreetView - test = os.path.join(settings.EXPOFILES, "location_maps", "testmap.png") - response = HttpResponse(content_type = "image/png") - with Image.open(test) as im: + # test = os.path.join(settings.EXPOFILES, "location_maps", "testmap.png") + # response = HttpResponse(content_type = "image/png") + # with Image.open(test) as im: - draw = ImageDraw.Draw(im) - draw.line((0, 0) + im.size, fill=128) - draw.line((0, im.size[1], im.size[0], 0), fill=128) + # draw = ImageDraw.Draw(im) + # draw.line((0, 0) + im.size, fill=128) + # draw.line((0, im.size[1], im.size[0], 0), fill=128) - # write to stdout - #im.save(sys.stdout, "PNG") - img.save(response, "PNG") + # # write to stdout + # #im.save(sys.stdout, "PNG") + # img.save(response, "PNG") - return response + # return response mainImage = Image.open(os.path.join(settings.EXPOFILES, "location_maps", "pguidemap.jpg")) - if settings.PUBLIC_SITE and not request.user.is_authenticated: - mainImage = Image.new("RGB", mainImage.size, '#ffffff') + # if settings.PUBLIC_SITE and not request.user.is_authenticated: + # mainImage = Image.new("RGB", mainImage.size, '#ffffff') m = maps[name] #imgmaps = [] if name == "all": diff --git a/templates/prospecting.html b/templates/prospecting.html index 26de6fc..9ada16f 100644 --- a/templates/prospecting.html +++ b/templates/prospecting.html @@ -14,6 +14,18 @@

The sub-areas names: '1a', '2a' etc. have not been in active use for some years as all exploration for at least the past two decades has been on the mid- to far-plateau. +

To see the old prospecting guide maps, follow this links (but wait - can take 2 minutes per map), +and you can't see any annotations unless you zoom in: +

+

Notes: