Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
OGC
3DGeoVolumesAPI
Commits
bbb4aeae
Commit
bbb4aeae
authored
Oct 03, 2022
by
JOE XMG
Browse files
update
parent
abeff0b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
server.js
View file @
bbb4aeae
...
...
@@ -150,6 +150,22 @@
res
.
send
(
"
internal error at /3DGeoVolumes/collections/:collectionsId
"
)
}
})
// request 3D Tiles
app
.
get
(
'
/collections/:collectionsId/3dtiles
'
,
function
(
req
,
res
)
{
try
{
if
(
req
.
params
.
collectionsId
==
"
Stuttgart_LOD2_Stadtmitte
"
)
{
res
.
redirect
(
"
http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json
"
)
}
else
{
var
collections_3dtiles_json
=
require
(
`./3DGeoVolumes/collections/
${
req
.
params
.
collectionsId
}
/3dtiles/tileset.json`
)
var
collections_3dtiles_output
=
replace_server_url
(
collections_3dtiles_json
)
res
.
json
(
collections_3dtiles_output
);
}
}
catch
(
error
)
{
console
.
log
(
error
)
res
.
send
(
"
internal error at /3DGeoVolumes/collections/:collectionsId/3dtiles
"
)
}
})
app
.
get
(
'
/collections/:collectionsId/:containerId
'
,
function
(
req
,
res
)
{
try
{
...
...
@@ -159,26 +175,23 @@
res
.
send
(
"
internal error at /3DGeoVolumes/collections/:collectionsId/:containerId
"
)
}
})
// app.get('/collections/Stuttgart_LOD2_Stadtmitte/3dtiles', function (req, res) {
// res.redirect("http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json")
// })
// request 3D Tiles
app
.
get
(
'
/collections/:collectionsId/3dtiles
'
,
function
(
req
,
res
)
{
app
.
get
(
'
/collections/:collectionsId/:containerId/3dtiles
'
,
function
(
req
,
res
)
{
try
{
if
(
req
.
params
.
collectionsId
==
"
Stuttgart_LOD2_Stadtmitte
"
)
{
res
.
redirect
(
"
http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json
"
)
}
else
{
var
collections_3dtiles_json
=
require
(
`./3DGeoVolumes/collections/
${
req
.
params
.
collectionsId
}
/3dtiles/tileset.json`
)
var
collections_3dtiles_json
=
require
(
`./3DGeoVolumes/collections/
${
req
.
params
.
collectionsId
}
/
${
req
.
params
.
containerId
}
/tileset.json`
)
var
collections_3dtiles_output
=
replace_server_url
(
collections_3dtiles_json
)
res
.
json
(
collections_3dtiles_output
);
}
}
catch
(
error
)
{
res
.
send
(
"
internal error at /3DGeoVolumes/collections/:collectionsId/3dtiles
"
)
console
.
log
(
error
)
res
.
send
(
"
internal error
"
)
}
})
// app.get('/collections/Stuttgart_LOD2_Stadtmitte/3dtiles', function (req, res) {
// res.redirect("http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json")
// })
// 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/
"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment