Commit 66fdc9ad authored by JOE XMG's avatar JOE XMG
Browse files

update ejs template

parent 2d41e117
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"collections": [ "collections": [
{ {
"id": "NewYork", "id": "NewYork",
"title": "NewYork Data Source", "title": "NewYork",
"description": "All Supported 3D Containers for the city of NewYork", "description": "All Supported 3D Containers for the city of NewYork",
"collectiontype": "3d-container", "collectiontype": "3d-container",
"extent": { "extent": {
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
}, },
{ {
"id": "Stuttgart", "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", "description": "All Supported 3D Containers for the city of Stuttgart LoD 1 from OSM with Textures",
"collectiontype": "3d-container", "collectiontype": "3d-container",
"extent": { "extent": {
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
"type": "application/json" "type": "application/json"
}, },
{ {
"title": "Stuttgart 3D Building Model - Collections", "title": "Stuttgart - Collections",
"rel": "self", "rel": "self",
"href": "host_url/collections/Stuttgart/", "href": "host_url/collections/Stuttgart/",
"type": "application/json" "type": "application/json"
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
"type": "application/json" "type": "application/json"
}, },
{ {
"title": "Stuttgart Collections", "title": "HFT Building 2 - Collections",
"rel": "self", "rel": "self",
"href": "https://steinbeis-3dps.eu/3DGeoVolumes/collections/Stuttgart", "href": "https://steinbeis-3dps.eu/3DGeoVolumes/collections/Stuttgart",
"type": "application/json" "type": "application/json"
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
], ],
"content": [ "content": [
{ {
"title": "Stuttgart 3D Building Model - Collections", "title": "Stuttgart Collection",
"rel": "original", "rel": "original",
"href": "host_url/collections/Stuttgart/", "href": "host_url/collections/Stuttgart/",
"type": "application/json" "type": "application/json"
......
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
"author": "thunyathep.s@outlook.com", "author": "thunyathep.s@outlook.com",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"body-parser": "^1.19.2", "body-parser": "^1.20.0",
"box-intersect": "^1.0.2", "box-intersect": "^1.0.2",
"compression": "^1.7.4", "compression": "^1.7.4",
"ejs": "^3.1.6", "ejs": "^3.1.8",
"express": "^4.17.3", "express": "^4.18.1",
"useragent": "^2.3.0" "useragent": "^2.3.0"
} }
} }
...@@ -123,8 +123,6 @@ ...@@ -123,8 +123,6 @@
var collection_resource_updated_bbox = validate_bbox(collection_resource_updated, req) var collection_resource_updated_bbox = validate_bbox(collection_resource_updated, req)
// check user-agent // check user-agent
var is_ajax = req.xhr;
var agent = useragent.parse(req.headers['user-agent']); var agent = useragent.parse(req.headers['user-agent']);
var agentString = agent.toString() var agentString = agent.toString()
console.log(`request agent: ${agentString}`) console.log(`request agent: ${agentString}`)
...@@ -144,7 +142,6 @@ ...@@ -144,7 +142,6 @@
app.get('/collections/:collectionsId', function (req, res) { app.get('/collections/:collectionsId', function (req, res) {
try { 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 = require('./3DGeoVolumes/collections/collections.json')
var collection_resource_updated = replace_server_url(collection_resource) var collection_resource_updated = replace_server_url(collection_resource)
var selected_collection_byID = [] var selected_collection_byID = []
...@@ -202,12 +199,6 @@ ...@@ -202,12 +199,6 @@
res.send("internal error") 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) { app.get('/i3s', function (req, res) {
if (req.query.i3s_resource_url) { if (req.query.i3s_resource_url) {
......
...@@ -96,8 +96,7 @@ ...@@ -96,8 +96,7 @@
<div id="viewDiv"></div> <div id="viewDiv"></div>
<div id="paneDiv" class="esri-widget"> <div id="paneDiv" class="esri-widget">
<h1 style="line-height: 1em;">i3s client</h1> <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 <a class="esri-button" href="../" style="text-decoration: none; ">Back</a>
GeoPortal <br>(3D Tiles Client)</a><br /> -->
</div> </div>
</body> </body>
......
...@@ -36,6 +36,10 @@ ...@@ -36,6 +36,10 @@
})) }))
Cesium.when(tileset.readyPromise).then(function (tileset) { Cesium.when(tileset.readyPromise).then(function (tileset) {
viewer.flyTo(tileset) viewer.flyTo(tileset)
// When the translation is needed...
// var cartographic = Cesium.Cartographic.fromCartesian( // var cartographic = Cesium.Cartographic.fromCartesian(
// tileset.boundingSphere.center // tileset.boundingSphere.center
// ); // );
......
...@@ -16,20 +16,13 @@ ...@@ -16,20 +16,13 @@
<body> <body>
<div class="container"> <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"> <nav class="navbar navbar-light bg-light">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="#"> <a class="navbar-brand" href="#">
<h3> <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 Demo GeoVolumes Server
</h3> </h3>
</a> </a>
...@@ -138,22 +131,9 @@ ...@@ -138,22 +131,9 @@
</div> </div>
</div> </div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" <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"> integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous">
</script> </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> </body>
......
<span class="text-muted">Found technical issue? Please contact <a <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> </span>
<footer class="footer mt-auto py-3 bg-light"> <footer class="footer mt-auto py-3 bg-light">
<div class="container"> <div class="container">
<span class="text-muted text-center"> <span class="text-muted text-center">
<img src="https://steinbeis-3dps.eu/images/stw-stuttgart.jpg" alt="" width="32"> <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> </span>
</div> </div>
</footer> </footer>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment