Commit 17b989d6 authored by Patrick's avatar Patrick
Browse files

update

parent 1de7beaa
...@@ -32,7 +32,7 @@ const httpsServer = https.createServer(credentials, app); ...@@ -32,7 +32,7 @@ const httpsServer = https.createServer(credentials, app);
// console.log('HTTP Server running on port 80'); // console.log('HTTP Server running on port 80');
// }); // });
httpsServer.listen(8083, () => { httpsServer.listen(8084, () => {
console.log('HTTPS Server running on port 8083'); console.log('HTTPS Server running on port 8084');
}); });
...@@ -53,6 +53,7 @@ app.post('/newBallon', function(req,res){ ...@@ -53,6 +53,7 @@ app.post('/newBallon', function(req,res){
getCurrentFilenames(); getCurrentFilenames();
writeGeojsonFile(); writeGeojsonFile();
writeConfigFile(); writeConfigFile();
res.end('It worked!');
} }
catch (err) { catch (err) {
...@@ -109,7 +110,7 @@ try { ...@@ -109,7 +110,7 @@ try {
function writeConfigFile(){ function writeConfigFile(){
// name of the file // name of the file
var filename = 'vcm/configcopy.json'; var filename = 'vcm/config.json';
var contentSync = fs.readFileSync(filename); var contentSync = fs.readFileSync(filename);
console.log('Content of the file : ' + contentSync); console.log('Content of the file : ' + contentSync);
console.log(contentSync.includes('"balloonTypes":')); console.log(contentSync.includes('"balloonTypes":'));
...@@ -140,7 +141,7 @@ var ballonText = "\"balloonTypes\": [" + ...@@ -140,7 +141,7 @@ var ballonText = "\"balloonTypes\": [" +
"{" + "{" +
"\"template\": [" + "\"template\": [" +
"\"<div class='balloon' onclick='' id='myBalloon'>\"," + "\"<div class='balloon' onclick='' id='myBalloon'>\"," +
"\" <h1 class='balloon-title'>'" + ballonContent.header + "'</h1>\"," + "\" <h1 class='balloon-title'>" + ballonContent.header + "</h1>\"," +
"\" <div class='balloon-content' style='height:290px; margin-right: 0px;'\"," + "\" <div class='balloon-content' style='height:290px; margin-right: 0px;'\"," +
"\" </div>\"," + "\" </div>\"," +
"\"<p class='balloon-text'><span>" + ballonContent.Content + "</span><br></p>\"," + "\"<p class='balloon-text'><span>" + ballonContent.Content + "</span><br></p>\"," +
......
...@@ -145,7 +145,8 @@ ...@@ -145,7 +145,8 @@
{ {
"type": "vcs.vcm.widgets.BalloonInfo", "type": "vcs.vcm.widgets.BalloonInfo",
"name": "Balloon Info", "name": "Balloon Info",
"balloonTypes": [ "balloonTypes": [{"template": ["<div class='balloon' onclick='' id='myBalloon'>"," <h1 class='balloon-title'>'Test'</h1>"," <div class='balloon-content' style='height:290px; margin-right: 0px;'"," </div>","<p class='balloon-text'><span>This is a test</span><br></p>","</div>","<% %>"],"minTop": "balloonHeight + 10","minLeft": "70","layerTypes": [""],"layerNames": ["100005"]},
{"template": ["<div class='balloon' onclick='' id='myBalloon'>"," <h1 class='balloon-title'>'Test'</h1>"," <div class='balloon-content' style='height:290px; margin-right: 0px;'"," </div>","<p class='balloon-text'><span>This is a test</span><br></p>","</div>","<% %>"],"minTop": "balloonHeight + 10","minLeft": "70","layerTypes": [""],"layerNames": ["100004"]},
{"template": [ {"template": [
"<div class='balloon' onclick='' id='myBalloon'>", "<div class='balloon' onclick='' id='myBalloon'>",
" <h1 class='balloon-title'>Test</h1>", " <h1 class='balloon-title'>Test</h1>",
...@@ -834,7 +835,26 @@ ...@@ -834,7 +835,26 @@
] ]
} }
], ],
"layers": [ "layers": [{"name": "100005","url": "./templates/100005.geojson","type": "vcs.vcm.layer.GeoJSON","datasourceId": "...","activeOnStartup": true,"exclusive": false,"projection": { "epsg": "4326", "proj4": ""},"altitudeMode": "relativeToGround","style": { "image": { "icon": { "src": "./templates/locationSM.png", "scale": 0.5 } }},"heightAboveGround": 0},
{
"name": "100004",
"url": "./templates/100004.geojson",
"type": "vcs.vcm.layer.GeoJSON",
"datasourceId": "...",
"activeOnStartup": true,
"exclusive": false,
"projection": { "epsg": "4326", "proj4": ""},
"altitudeMode": "relativeToGround",
"style": {
"image": {
"icon": {
"src": "./templates/locationSM.png",
"scale": 0.5
}
}
},
"heightAboveGround": 0},
{"name": "ProjektNord", {"name": "ProjektNord",
"url": "./templates/100002.geojson", "url": "./templates/100002.geojson",
"type": "vcs.vcm.layer.GeoJSON", "type": "vcs.vcm.layer.GeoJSON",
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
{ {
"type": "vcs.vcm.widgets.BalloonInfo", "type": "vcs.vcm.widgets.BalloonInfo",
"name": "Balloon Info", "name": "Balloon Info",
"balloonTypes": [ "balloonTypes": [{"template": ["<div class='balloon' onclick='' id='myBalloon'>"," <h1 class='balloon-title'>'Test'</h1>"," <div class='balloon-content' style='height:290px; margin-right: 0px;'"," </div>","<p class='balloon-text'><span>This is a test</span><br></p>","</div>","<% %>"],"minTop": "balloonHeight + 10","minLeft": "70","layerTypes": [""],"layerNames": ["100004"]},
{"template": [ {"template": [
"<div class='balloon' onclick='' id='myBalloon'>", "<div class='balloon' onclick='' id='myBalloon'>",
" <h1 class='balloon-title'>Test</h1>", " <h1 class='balloon-title'>Test</h1>",
...@@ -853,7 +853,27 @@ ...@@ -853,7 +853,27 @@
] ]
} }
], ],
"layers": [{"name": "100003","url": "./templates/100003.geojson","type": "vcs.vcm.layer.GeoJSON","datasourceId": "...","activeOnStartup": true,"exclusive": false,"projection": { "epsg": "4326", "proj4": ""},"altitudeMode": "relativeToGround","style": { "image": { "icon": { "src": "./templates/test.png", "scale": 0.5 } }},"heightAboveGround": 0},{"name": "100002","url": "./templates/100002.geojson","type": "vcs.vcm.layer.GeoJSON","datasourceId": "...","activeOnStartup": true,"exclusive": false,"projection": { "epsg": "4326", "proj4": ""},"altitudeMode": "relativeToGround","style": { "image": { "icon": { "src": "./templates/test.png", "scale": 0.5 } }},"heightAboveGround": 0}, "layers": [
{
"name": "100004",
"url": "./templates/100004.geojson",
"type": "vcs.vcm.layer.GeoJSON",
"datasourceId": "...",
"activeOnStartup": true,
"exclusive": false,
"projection": { "epsg": "4326", "proj4": ""},
"altitudeMode": "relativeToGround",
"style": {
"image": {
"icon": {
"src": "./templates/locationSM.png",
"scale": 0.5
}
}
},
"heightAboveGround": 0}
,{"name": "100003","url": "./templates/100003.geojson","type": "vcs.vcm.layer.GeoJSON","datasourceId": "...","activeOnStartup": true,"exclusive": false,"projection": { "epsg": "4326", "proj4": ""},"altitudeMode": "relativeToGround","style": { "image": { "icon": { "src": "./templates/test.png", "scale": 0.5 } }},"heightAboveGround": 0},{"name": "100002","url": "./templates/100002.geojson","type": "vcs.vcm.layer.GeoJSON","datasourceId": "...","activeOnStartup": true,"exclusive": false,"projection": { "epsg": "4326", "proj4": ""},"altitudeMode": "relativeToGround","style": { "image": { "icon": { "src": "./templates/test.png", "scale": 0.5 } }},"heightAboveGround": 0},
{ {
"name": "Böckingerstrasse", "name": "Böckingerstrasse",
"url": "./datasource-data/f02945f6-7978-4abc-940b-4c47af169b12/tileset.json", "url": "./datasource-data/f02945f6-7978-4abc-940b-4c47af169b12/tileset.json",
......
...@@ -181,27 +181,14 @@ ...@@ -181,27 +181,14 @@
</div> </div>
</div> </div>
<button class="accordion">Add Pins</button> <!-- <button class="accordion">Add Pins</button>
<div class="sub-menu"> <div class="sub-menu">
<!-- <a href="#" onclick="">Luftbilder</a> -->
<a href="#" onclick="addingPin()">Adding a Pin</a> <a href="#" onclick="addingPin()">Adding a Pin</a>
<!-- <span data-v-7b90bcab="" tabindex="0" class="vcm-LeadButton vcm-btn-base-dye02 vcm-btn-font-dye01 vcm-btn-font-dye01-hover vcm-btn-border vcm-border-dye02 vcm-btn-base-splash-hover vcm-no-select image-button active point" title="Point"></span> -->
</div>
<!-- <button class="accordion">Energy</button>
<div class="sub-menu">
<a href="#" onclick="EnergiekonzeptFunction('nothing')">Stöckach</a>
<a href="#" onclick="nordbahnview()">Nordbahnhof</a>
</div>
<button class="accordion">Acoustics</button>
<div class="sub-menu">
<a href="#">Sub Menu 3</a>
</div>
<button class="accordion">Mobility</button>
<div class="sub-menu">
<a href="#">Sub Menu 3</a>
</div> --> </div> -->
</div> </div>
</div> </div>
<!-- Drop down menu ends here --> <!-- Drop down menu ends here -->
......
{ "type": "FeatureCollection", "name": "data_point","crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": "Feature", "properties": { "id": null, "name": "datapoint" }, "geometry": { "type": "Point", "coordinates": [ 9.100654, 48.805035 ] } } ] }
\ No newline at end of file
{ "type": "FeatureCollection", "name": "data_point","crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": "Feature", "properties": { "id": null, "name": "datapoint" }, "geometry": { "type": "Point", "coordinates": [ 9.101334, 48.805138 ] } } ] }
\ No newline at end of file
...@@ -32,6 +32,8 @@ function PostUserInput(){ ...@@ -32,6 +32,8 @@ function PostUserInput(){
catch (err) { catch (err) {
console.log('-> function PostUserInput() failed!\n' + err); console.log('-> function PostUserInput() failed!\n' + err);
} }
startVCM();
} }
function addingPin() { function addingPin() {
...@@ -62,8 +64,8 @@ function addingPin() { ...@@ -62,8 +64,8 @@ function addingPin() {
(" " + latitudeString).slice(-7) + (" " + latitudeString).slice(-7) +
"\u00B0"); "\u00B0");
PostUserInput(); // PostUserInput();
createTempPin(cartographic)
} else { } else {
} }
...@@ -75,4 +77,32 @@ function addingPin() { ...@@ -75,4 +77,32 @@ function addingPin() {
} }
\ No newline at end of file var map
var billboards
function createTempPin(cart) {
alert("start")
var mapstuff = vcs.vcm.Framework.getInstance().getActiveMap()
mapstuff.viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
point: {
pixelSize: 10,
color: Cesium.Color.YELLOW,
},
});
// map = vcs.vcm.Framework.getInstance().getActiveMap();
// // var CScene = map.viewer.scene
// billboards = vcs.vcm.Framework.getInstance().getActiveMap().viewer.scene.primitives.add(new Cesium.BillboardCollection());
// billboards.add({
// show : true,
// position : new Cesium.Cartesian3.fromDegrees(-80.12, 25.46),
// image: '/templates/locationSM.png',
// heightReference : Cesium.HeightReference.CLAMP_TO_GROUND
// })
};
\ No newline at end of file
Supports Markdown
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