From 66fdc9adf909af7049bfbfec5db413b7920e3b92 Mon Sep 17 00:00:00 2001 From: JOE XMG <thunyathep.s@outlook.com> Date: Tue, 4 Oct 2022 14:07:41 +0200 Subject: [PATCH] update ejs template --- 3DGeoVolumes/collections/collections.json | 10 +++++----- package.json | 6 +++--- server.js | 9 --------- views/arcgisclient.ejs | 3 +-- views/cesiumclient.ejs | 4 ++++ views/geovolumes/collections.ejs | 22 +--------------------- views/geovolumes/footer.ejs | 4 ++-- 7 files changed, 16 insertions(+), 42 deletions(-) diff --git a/3DGeoVolumes/collections/collections.json b/3DGeoVolumes/collections/collections.json index 742198f..1199e7c 100644 --- a/3DGeoVolumes/collections/collections.json +++ b/3DGeoVolumes/collections/collections.json @@ -10,7 +10,7 @@ "collections": [ { "id": "NewYork", - "title": "NewYork Data Source", + "title": "NewYork", "description": "All Supported 3D Containers for the city of NewYork", "collectiontype": "3d-container", "extent": { @@ -73,7 +73,7 @@ }, { "id": "Stuttgart", - "title": "Stuttgart 3D Models Demo", + "title": "Stuttgart", "description": "All Supported 3D Containers for the city of Stuttgart LoD 1 from OSM with Textures", "collectiontype": "3d-container", "extent": { @@ -91,7 +91,7 @@ "type": "application/json" }, { - "title": "Stuttgart 3D Building Model - Collections", + "title": "Stuttgart - Collections", "rel": "self", "href": "host_url/collections/Stuttgart/", "type": "application/json" @@ -131,7 +131,7 @@ "type": "application/json" }, { - "title": "Stuttgart Collections", + "title": "HFT Building 2 - Collections", "rel": "self", "href": "https://steinbeis-3dps.eu/3DGeoVolumes/collections/Stuttgart", "type": "application/json" @@ -192,7 +192,7 @@ ], "content": [ { - "title": "Stuttgart 3D Building Model - Collections", + "title": "Stuttgart Collection", "rel": "original", "href": "host_url/collections/Stuttgart/", "type": "application/json" diff --git a/package.json b/package.json index 3b64d4e..1b847bb 100644 --- a/package.json +++ b/package.json @@ -21,11 +21,11 @@ "author": "thunyathep.s@outlook.com", "license": "MIT", "dependencies": { - "body-parser": "^1.19.2", + "body-parser": "^1.20.0", "box-intersect": "^1.0.2", "compression": "^1.7.4", - "ejs": "^3.1.6", - "express": "^4.17.3", + "ejs": "^3.1.8", + "express": "^4.18.1", "useragent": "^2.3.0" } } diff --git a/server.js b/server.js index 7a98ee4..e864c8c 100644 --- a/server.js +++ b/server.js @@ -123,8 +123,6 @@ var collection_resource_updated_bbox = validate_bbox(collection_resource_updated, req) // check user-agent - var is_ajax = req.xhr; - var agent = useragent.parse(req.headers['user-agent']); var agentString = agent.toString() console.log(`request agent: ${agentString}`) @@ -144,7 +142,6 @@ app.get('/collections/:collectionsId', function (req, res) { try { - var collection_json = require(`./3DGeoVolumes/collections/${req.params.collectionsId}/${req.params.collectionsId}.json`) var collection_resource = require('./3DGeoVolumes/collections/collections.json') var collection_resource_updated = replace_server_url(collection_resource) var selected_collection_byID = [] @@ -202,12 +199,6 @@ res.send("internal error") } }) - - // request i3s - New York Manual Redirect - app.get('/collections/NewYork/i3s', function (req, res) { - res.redirect("https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_NewYork_17/SceneServer/layers/0/") - }) - app.get('/i3s', function (req, res) { if (req.query.i3s_resource_url) { diff --git a/views/arcgisclient.ejs b/views/arcgisclient.ejs index 6b633ea..b5e60b6 100644 --- a/views/arcgisclient.ejs +++ b/views/arcgisclient.ejs @@ -96,8 +96,7 @@ <div id="viewDiv"></div> <div id="paneDiv" class="esri-widget"> <h1 style="line-height: 1em;">i3s client</h1> - <!-- <a id="tent" class="esri-button" href="./index.html" target="_blank" style="text-decoration: none; ">Back to STT - GeoPortal <br>(3D Tiles Client)</a><br /> --> + <a class="esri-button" href="../" style="text-decoration: none; ">Back</a> </div> </body> diff --git a/views/cesiumclient.ejs b/views/cesiumclient.ejs index b373a09..64dcb2c 100644 --- a/views/cesiumclient.ejs +++ b/views/cesiumclient.ejs @@ -36,6 +36,10 @@ })) Cesium.when(tileset.readyPromise).then(function (tileset) { viewer.flyTo(tileset) + + // When the translation is needed... + + // var cartographic = Cesium.Cartographic.fromCartesian( // tileset.boundingSphere.center // ); diff --git a/views/geovolumes/collections.ejs b/views/geovolumes/collections.ejs index 3ce9522..a7ee9e7 100644 --- a/views/geovolumes/collections.ejs +++ b/views/geovolumes/collections.ejs @@ -16,20 +16,13 @@ <body> <div class="container"> - <!-- <h1> - <img src="https://transfer.hft-stuttgart.de/pages/buildicipate/webpage/assets/images/hft_logo.svg" alt="" - width="50px"> - <img src="https://steinbeis-3dps.eu/images/stw-stuttgart.jpg" alt="" width="50px"> - STT GeoVolumes Server - </h1> --> <nav class="navbar navbar-light bg-light"> <div class="container-fluid"> <a class="navbar-brand" href="#"> <h3> - <img src="https://steinbeis-3dps.eu/images/stw-stuttgart.jpg" alt="" width="50px"> - + <img src="https://steinbeis-3dps.eu/images/stw-stuttgart.jpg" alt="" width="50px"> Demo GeoVolumes Server </h3> </a> @@ -138,22 +131,9 @@ </div> </div> - - <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"> </script> - <!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> --> - <!-- <script> - $(document).ready(function () { - $("#searchBar").on("keyup", function () { - var value = $(this).val().toLowerCase(); - $(".collections_contents").filter(function () { - $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) - }); - }); - }); - </script> --> </body> diff --git a/views/geovolumes/footer.ejs b/views/geovolumes/footer.ejs index 3ef97b0..f38ecac 100644 --- a/views/geovolumes/footer.ejs +++ b/views/geovolumes/footer.ejs @@ -1,11 +1,11 @@ <span class="text-muted">Found technical issue? Please contact <a - href="https://www.hft-stuttgart.de/p/thunyathep-santhanavanich"> Joe </a> + href="https://www.linkedin.com/in/thunyatheps/"> Joe T.S. </a> </span> <footer class="footer mt-auto py-3 bg-light"> <div class="container"> <span class="text-muted text-center"> <img src="https://steinbeis-3dps.eu/images/stw-stuttgart.jpg" alt="" width="32"> - The Steinbeis Transfer Center Technology Consultancy @ HFT Stuttgart. 2018 - 2021 + The Steinbeis Transfer Center Technology Consultancy @ HFT Stuttgart. 2018 - 2022 </span> </div> </footer> \ No newline at end of file -- GitLab