summaryrefslogtreecommitdiffstats
path: root/core/views/prospect.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-04-16 21:47:40 +0100
committerPhilip Sargent <philip.sargent@klebos.com>2021-04-16 21:47:40 +0100
commit4ad7033285945243d48d9c13e853996cd864b40a (patch)
treea574b44ddaced201df4085163e675114b7376efc /core/views/prospect.py
parenteca0bcc6d837aede8b30dc0a9f5c714c83b5d756 (diff)
downloadtroggle-4ad7033285945243d48d9c13e853996cd864b40a.tar.gz
troggle-4ad7033285945243d48d9c13e853996cd864b40a.tar.bz2
troggle-4ad7033285945243d48d9c13e853996cd864b40a.zip
working, but very faint
Diffstat (limited to 'core/views/prospect.py')
-rw-r--r--core/views/prospect.py26
1 files changed, 13 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":