From f005ae2f4df00cd3436e1322db6487aa5c12de5d Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sun, 16 Jan 2022 17:25:05 +0000 Subject: [PATCH] Fix 3d stuff to work again... vaguely... --- worldmap.js | 3 + worldmap/index3d.html | 437 ++++++++++++++++++++++-------------------- 2 files changed, 227 insertions(+), 213 deletions(-) diff --git a/worldmap.js b/worldmap.js index 6358ad0..3242522 100644 --- a/worldmap.js +++ b/worldmap.js @@ -54,6 +54,9 @@ module.exports = function(RED) { //node.log("Serving "+__dirname+" as "+node.path); node.log("started at "+node.path); var clients = {}; + RED.httpNode.get("/-worldmap3d-key", RED.auth.needsPermission('worldmap3d.read'), function(req, res) { + res.send({key:process.env.MAPBOXGL_TOKEN||""}); + }); RED.httpNode.use(compression()); RED.httpNode.use(node.path, express.static(__dirname + '/worldmap')); // RED.httpNode.use(node.path, express.static(__dirname + '/worldmap', {maxage:3600000})); diff --git a/worldmap/index3d.html b/worldmap/index3d.html index 1723d91..94390db 100644 --- a/worldmap/index3d.html +++ b/worldmap/index3d.html @@ -6,8 +6,8 @@ - - + +