Commit b8d04daa authored by Patrick's avatar Patrick
Browse files

some test updates to serveralternative.js

parent adf1a565
......@@ -14,34 +14,167 @@ console.log("on 8080");
var IDGeojson = 100000
app.post('/newBallon', function(req,res){
try {
const data = req.body;
console.log("data ==============")
console.log(data.id);
args.gmlid = data.id
console.log(data[0]);
console.log(data[1]);
console.log("args ==============")
console.log(args);
//asdf
const returnedTarget = Object.assign(args.ui,data);
args.ui = data;
args.gmlid = data.id;
console.log("returned ==============")
console.log(returnedTarget)
console.log("args ==============")
console.log(args);
getCurrentFilenames();
writeGeojsonFile();
writeConfigFile();
}
catch (err) {
console.log('.../getSimS failed!\n' + err);
}
});
// List all the filenames before renaming
function getCurrentFilenames() {
console.log("Current filenames:");
fs.readdirSync(__dirname + '/vcm/templates').forEach(file => {
if (file.includes('.geojson')){
var tempid = file.replace('.geojson','')
// console.log(tempid)
if (isNaN(tempid) == false){
var tempid = parseInt(tempid, 10);
if (tempid >= IDGeojson){
IDGeojson = tempid
console.log("this one - " + IDGeojson)
}
} else {
console.log("not this one - " + tempid)
}
}
// console.log(file);
});
IDGeojson += 1
}
function writeGeojsonFile() {
var geojsontemplate = ' {' +
' "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.195387, 48.835579 ] } }' +
' ]' +
' }'
console.log(geojsontemplate);
try {
console.log(geojsontemplate);
fs.writeFile(__dirname + "/vcm/templates/" + IDGeojson + '.geojson', geojsontemplate, function (err) {
if (err) throw err;
console.log('Saved!');
});
} catch (err) {
console.error(err);
}
}
function writeConfigFile(){
// name of the file
var filename = 'vcm/config.json';
var filename = 'vcm/configcopy.json';
var contentSync = fs.readFileSync(filename);
console.log('Content of the file : ' + contentSync);
console.log(contentSync.includes('"balloonTypes":'));
// var newtext = contentSync.replace("balloonTypes","this is a test")
// "balloonTypes": [
// {adfafas
// "template": [
// "<div class='balloon' id='myBalloon'>",
// " <h1 class='balloon-title'><%= obj.title %></h1>",
// " <div class='balloon-content'>",
// " <%= obj.description %>",
// " </div>",
// " <div class='balloon-close-col'>",
// " <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>",
// " </div>",
// " <div class='dialog-image-balloon'></div>",
// " <div class='balloon-left-edge'></div>",
// "</div>"
// ],
// "minTop": "balloonHeight + 70",
// "minLeft": "70",
// "layerNames": [],
// "layerTypes": [
// "vcs.vcm.layer.Vector"
// ]
// },
\ No newline at end of file
var newtext = contentSync.toString().replace('"layers": [','"layers": [' +
'{' +
'"name": "'+ IDGeojson +'",' +
'"url": "./templates/'+IDGeojson+'.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' +
'},')
var ballonText = "\"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>Das hier ist ein Test Ballon. Er wurde von einem User erstellt.</span><br></p>\"," +
// "\"<img style='padding-top:10px' src='images/content/contentboeckingerstrasse/station3_outdoorkiosk1.jpg' alt='Simply Easy Learning' width='375'>\"," +
"\"</div>\"," +
"\"<% %>\"" +
// "\"<% openquestionaire() %>\"" +
"]," +
"\"minTop\": \"balloonHeight + 10\"," +
"\"minLeft\": \"70\"," +
"\"layerTypes\": [" +
"\"\""+
"],"+
"\"layerNames\": [" +
"\""+ IDGeojson +"\"" +
"]" +
"},"
var newtext = newtext.toString().replace("\"balloonTypes\": [", ballonText)
console.log(newtext);
fs.writeFile(filename, newtext, 'utf8', function (err) {
if (err) return console.log(err);
});
}
function writeBallon() {
var ballonText = "{" +
"\"template\": [" +
"\"<div class='balloon' onclick='showtourSpecific()' id='myBalloon'>\"," +
"\" <h1 class='balloon-title'>Station 3</h1>\"," +
"\" <div class='balloon-content' style='height:290px; margin-right: 0px;'\"," +
"\" </div>\"," +
"\"<p class='balloon-text'><span>hier wurde eine Outdoorkiosk errichtet.</span><br></p>\"," +
"\"<img style='padding-top:10px' src='images/content/contentboeckingerstrasse/station3_outdoorkiosk1.jpg' alt='Simply Easy Learning' width='375'>\"," +
"\"</div>\"," +
"\"<% %>\"," +
"\"<% openquestionaire() %>\"" +
"]," +
"\"minTop\": \"balloonHeight + 10\"," +
"\"minLeft\": \"70\"," +
"\"layerTypes\": [" +
"\"\""+
"],"+
"\"layerNames\": [" +
"\"LocationThree\"" +
"]" +
"},"
}
\ No newline at end of file
......@@ -146,6 +146,18 @@
"type": "vcs.vcm.widgets.BalloonInfo",
"name": "Balloon Info",
"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>Das hier ist ein Test Ballon. Er wurde von einem User erstellt.</span><br></p>",
"</div>","<% %>"
],
"minTop": "balloonHeight + 10",
"minLeft": "70",
"layerTypes": [""],
"layerNames": ["100002"]
},
{
"template": [
"<div class='balloon' id='myBalloon'>",
......@@ -842,6 +854,21 @@
}
],
"layers": [
{"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/lightning.png",
"scale": 0.5
}
}},
"heightAboveGround": 0},
{
"name": "Böckingerstrasse",
"url": "./datasource-data/f02945f6-7978-4abc-940b-4c47af169b12/tileset.json",
......
{
"mapcontainer": "vcs_map_container",
"locale": "en",
"availableLocales": [
"de",
"en"
],
"startViewPoint": "startview",
"projection": {
"epsg": 31463,
"proj4": "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"
},
"ui": {
"startRoute": null,
"content": {
"show": true,
"iframe": {
"contentPosition": "center",
"contentPositionFixed": false,
"show": true
},
"legend": {
"contentPosition": "left",
"contentPositionFixed": false,
"show": true
}
},
"search": {
"activeOnStartup": false
},
"toolbox": {
"show": true,
"homeButton": {
"show": true
},
"mapButtons": {
"show": true
},
"widgetButtons": {
"show": true
},
"overviewMap": {
"show": true
}
},
"metaLinks": {
"links": [
{
"url": {
"de": "templates/de/impressum.html",
"en": "templates/en/impressum.html"
},
"title": {
"de": "Impressum",
"en": "Imprint"
},
"target": "iframe"
},
{
"url": {
"de": "templates/de/datenschutzhinweise.html",
"en": "templates/en/datenschutzhinweise.html"
},
"title": {
"de": "Datenschutz",
"en": "Privacy"
},
"target": "iframe"
}
]
},
"mapControls": {
"show": true,
"Navigation": {
"show": true
},
"Shadow": {
"show": true
}
},
"footer": {
"logoBox": {
"show": true,
"text": null
},
"show": true
},
"header": {
"headerButtons": {
"show": true,
"help": true
},
"show": true,
"logoBox": null,
"title": "M4_Lab Platform"
}
},
"selectBehavior": {
"highlightStyle": {
"selectionset": {
"color": "rgb(63, 81, 181)"
},
"currentItem": {
"color": "rgb(244, 67, 54)",
"pointStyle": {
"icon": {
"scale": 1,
"src": "{layerIcon}"
}
},
"lineStyle": {
"color": "rgb(131, 245, 44)",
"width": 1.25
},
"polygonStyle": {
"fill": {
"color": "rgba(255, 255, 255, 0.4)"
},
"stroke": {
"color": "rgb(131, 245, 44)",
"width": "1"
}
}
}
}
},
"maps": [
{
"name": "Cesium Map",
"startingmap": true,
"type": "vcs.vcm.maps.Cesium",
"webGLaa": false
},
{
"name": "Openlayers Map",
"startingmap": false,
"type": "vcs.vcm.maps.Openlayers"
}
],
"widgets": [
{
"type": "vcs.vcm.widgets.AdvancedWalkMode",
"name": "Advanced walkmode"
},
{
"type": "vcs.vcm.widgets.BalloonInfo",
"name": "Balloon Info",
"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>Das hier ist ein Test Ballon. Er wurde von einem User erstellt.</span><br></p>",
"</div>","<% %>"
],
"minTop": "balloonHeight + 10",
"minLeft": "70",
"layerTypes": [""],
"layerNames": ["100003"]
},
{
"template": [
"<div class='balloon' id='myBalloon'>",
" <h1 class='balloon-title'><%= obj.title %></h1>",
" <div class='balloon-content'>",
" <%= obj.description %>",
" </div>",
" <div class='balloon-close-col'>",
" <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>",
" </div>",
" <div class='dialog-image-balloon'></div>",
" <div class='balloon-left-edge'></div>",
"</div>"
],
"minTop": "balloonHeight + 70",
"minLeft": "70",
"layerNames": [],
"layerTypes": [
"vcs.vcm.layer.Vector"
]
},
{
"template": [
"<div class='balloon' id='myBalloon'>",
" <h1 class='balloon-title'><%= obj.name %></h1>",
" <div class='balloon-content'>",
" <%= obj.description %>",
" </div>",
" <div class='balloon-close-col'>",
" <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>",
" </div>",
" <div class='dialog-image-balloon'></div>",
" <div class='balloon-left-edge'></div>",
"</div>"
],
"minTop": "balloonHeight + 70",
"minLeft": "70",
"layerNames": [],
"layerTypes": [
"vcs.vcm.layer.cesium.Gltf"
]
},
{
"comment": "Default Balloon for Planning Vector Layers",
"template": [
"<div class='balloon' id='myBalloon'>",
"<div class='balloon-content'>",
"<h1 class='balloon-title'>Balloon header</h1>",
"</div>",
"<div class='balloon-close-col'><button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>",
"</div><div class='dialog-image-balloon'></div><div class='balloon-left-edge'></div></div>"
],
"minTop": "balloonHeight + 70",
"minLeft": "70",
"layerNames": [],
"layerTypes": [
"vcs.vcm.layer.FeatureStore"
],
"allAvailable": false,
"properties": [],
"balloonHeader": "Balloon header"
},
{
"template": [
"<div class='balloon' id='myBalloon'>",
"<div class='balloon-content'>",
"<h1 class='balloon-title'>Balloon header</h1>",
"<% for (var key in obj) { %>",
"<% if (obj[key] instanceof Object){%>",
"<% for (var key2 in obj[key]) { %>",
"<p class='balloon-text'><span class='balloon-street'> <strong> <%=key%>.<%=key2%> </strong> : <%=obj[key][key2]%></span><br></p>",
"<% } %>",
"<% } else{ %>",
"<p class='balloon-text'>",
"<span class='balloon-street'> <strong> <%=key%> </strong> : <%=obj[key]%></span><br>",
"</p>",
"<% } %>",
"<% } %>",
"</div>",
"<div class='balloon-close-col'>",
"<button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>",
"</div>",
"<div class='dialog-image-balloon'></div>",
"<div class='balloon-left-edge'></div>",
"</div>"
],
"layerTypes": [
null
],
"layerNames": [
"Böckingerstrasse"
],
"minTop": "balloonHeight + 30",
"minLeft": "70",
"allAvailable": true,
"properties": [],
"balloonHeader": "Balloon header"
},
{
"template": [
"<div class='balloon' id='myBalloon'>",
"<div class='balloon-content'>",
"<h1 class='balloon-title'>Balloon header</h1>",
"<% for (var key in obj) { %>",
"<% if (obj[key] instanceof Object){%>",
"<% for (var key2 in obj[key]) { %>",
"<p class='balloon-text'><span class='balloon-street'> <strong> <%=key%>.<%=key2%> </strong> : <%=obj[key][key2]%></span><br></p>",
"<% } %>",
"<% } else{ %>",
"<p class='balloon-text'>",
"<span class='balloon-street'> <strong> <%=key%> </strong> : <%=obj[key]%></span><br>",
"</p>",
"<% } %>",
"<% } %>",
"</div>",
"<div class='balloon-close-col'>",
"<button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>",
"</div>",
"<div class='dialog-image-balloon'></div>",
"<div class='balloon-left-edge'></div>",
"</div>"
],
"layerTypes": [
null
],
"layerNames": [
"Rosenstein"
],
"minTop": "balloonHeight + 30",
"minLeft": "70",
"allAvailable": true,
"properties": [
{
"title": "creationDate",
"name": "creationDate"
},
{
"title": "gml:name",
"name": "gml:name"
}
],
"balloonHeader": "Balloon header"
},{
"template": [
"<div class='balloon' id='myBalloon'>",
"<div class='balloon-content'>",
"<h1 class='balloon-title'>Balloon header</h1>",
"<% for (var key in obj) { %>",
"<% if (obj[key] instanceof Object){%>",
"<% for (var key2 in obj[key]) { %>",
"<p class='balloon-text'><span class='balloon-street'> <strong> <%=key%>.<%=key2%> </strong> : <%=obj[key][key2]%></span><br></p>",
"<% } %>",
"<% } else{ %>",
"<p class='balloon-text'>",
"<span class='balloon-street'> <strong> <%=key%> </strong> : <%=obj[key]%></span><br>",
"</p>",
"<% } %>",
"<% } %>",
"</div>",
"<div class='balloon-close-col'>",
"<button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>",
"</div>",
"<div class='dialog-image-balloon'></div>",
"<div class='balloon-left-edge'></div>",
"</div>"
],
"layerTypes": [
null
],
"layerNames": [
"StuttgartLocal"
],
"minTop": "balloonHeight + 30",
"minLeft": "70",
"allAvailable": true,
"properties": [
{
"title": "creationDate",
"name": "creationDate"
},
{
"title": "gml:name",
"name": "gml:name"
}
],
"balloonHeader": "Balloon header"
},{
"template": [
"<div class='balloon' id='myBalloon'>",
"<div class='balloon-content'>",
"<h1 class='balloon-title'>Balloon header</h1>",
"<% for (var key in obj) { %>",
"<% if (obj[key] instanceof Object){%>",
"<% for (var key2 in obj[key]) { %>",
"<p class='balloon-text'><span class='balloon-street'> <strong> <%=key%>.<%=key2%> </strong> : <%=obj[key][key2]%></span><br></p>",
"<% } %>",
"<% } else{ %>",
"<p class='balloon-text'>",
"<span class='balloon-street'> <strong> <%=key%> </strong> : <%=obj[key]%></span><br>",
"</p>",
"<% } %>",
"<% } %>",
"</div>",
"<div class='balloon-close-col'>",
"<button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>",
"</div>",
"<div class='dialog-image-balloon'></div>",
"<div class='balloon-left-edge'></div>",
"</div>"
],
"layerTypes": [
null
],
"layerNames": [
"StuttgartPart"
],
"minTop": "balloonHeight + 30",
"minLeft": "70",
"allAvailable": true,
"properties": [
{
"title": "creationDate",
"name": "creationDate"
},
{
"title": "gml:name",
"name": "gml:name"
}
],
"balloonHeader": "Balloon header"
},
{
"template": [
"<div class='balloon' id='myBalloon'>",
"<div class='balloon-content'>",
"<h1 class='balloon-title'>Balloon header</h1>",
"<% for (var key in obj) { %>",
"<% if (obj[key] instanceof Object){%>",
"<% for (var key2 in obj[key]) { %>",
"<p class='balloon-text'><span class='balloon-street'> <strong> <%=key%>.<%=key2%> </strong> : <%=obj[key][key2]%></span><br></p>",
"<% } %>",
"<% } else{ %>",
"<p class='balloon-text'>",
"<span class='balloon-street'> <strong> <%=key%> </strong> : <%=obj[key]%></span><br>",
"</p>",
"<% } %>",
"<% } %>",
"</div>",
"<div class='balloon-close-col'>",
"<button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>",
"</div>",
"<div class='dialog-image-balloon'></div>",
"<div class='balloon-left-edge'></div>",
"</div>"
],
"layerTypes": [
null
],
"layerNames": [
"Stöckach"
],
"minTop": "balloonHeight + 30",
"minLeft": "70",
"allAvailable": true,
"properties": [
{
"title": "creationDate",
"name": "creationDate"
},
{
"title": "gml:name",
"name": "gml:name"
}
],
"balloonHeader": "Balloon header"
},{
"template": [
"<div class='balloon' onclick='Questionnaire()' id='myBalloonP1'>",
" <h1 class='balloon-title'>Umfrage (Böckinger Straße)</h1>",
" <div class='balloon-content' style='height:250px; margin-right: 0px;'",
" </div>",
"<p class='balloon-text'><span>Um die Umfrage zu starten klicken Sie bitte hier!</span><br></p>",
"<img style='padding-top:10px' src='images/content/contentboeckingerstrasse/Umfrage.jpg' alt='Simply Easy Learning' width='375'>",
"</div>",
"<% %>",
"<% openquestionaire() %>"
],
"minTop": "balloonHeight + 10",
"minLeft": "70",
"layerTypes": [
""
],
"layerNames": [
"Questionnaire"
]
},{
"template": [
"<div class='balloon' style='width: 200px; background-color: #3C3C3C; color: #FFFFFF;' id='myBalloonNord'>",
" <button class='infobtn' onclick='NordbahnhofText()'></button>",
" <h1 class='balloon-title' style='color: #FFFFFF;'>Nordbahnhof Planungskonzept</h1>",
" <div class='balloon-content' style='margin-right: 0px;'",
" </div>",
"<div class='box-3'>",
"<div class='btn btn-three' onclick='newPlan()'>",
"<span>Neue Planung</span>",
"</div><br>",
"<div class='btn btn-three' onclick='oldZust()'>",
"<span>Ist Zustand</span>",
"</div><br></div>",
"<div class='box-3'>",
"<p>Highlight &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p><div class='switch'>",
"<input type='checkbox' name='toggle' id='chxboxHighlight' onclick='checkboxHighlight(true);'>",
"<label for='toggle'><i></i></label>",
"<span></span>",
"</div>",
"</div>",
"<div class='box-3'>",
"<p>EnergyDemand</p><div class='switch'>",
"<input type='checkbox' name='toggle' id='chxboxDemand' onclick='checkboxDemand(true);'>",
"<label for='toggle'><i></i></label>",
"<span></span>",
"</div>",
"</div>",
"<% %>"
],
"minTop": "balloonHeight + 10",
"minLeft": "70",
"layerTypes": [
""
],
"layerNames": [
"ProjektNord"
]
},
{
"template": [
"<div class='balloon' id='myBalloonP1'>",
" <h1 class='balloon-title' onclick='EnergiekonzeptFunction(\"main\")'>Energiekonzept (Stöckach)</h1>",
" <div class='balloon-content' style='height:32em; width:380p;margin-right: 0px;'",
" </div>",
"<p class='balloon-text'><span>Für mehr Infos klicken Sie bitte hier!</span><br></p>",
"<img style='padding-top:10px' src='images/content/contentstoeckach/Stoeckach.jpg' usemap='#image-map' alt='Simply Easy Learning' width='375'>",
"<map name='image-map'>",
"<area id='mapElectricityID' alt='' title='electricity' shape='rect' coords='0,93,372,117' onclick='EnergiekonzeptFunction(\"Electricity\")' />",
"<area id='mapHeatID' alt='' title='heat' shape='rect' coords='0,202,375,227' onclick='EnergiekonzeptFunction(\"heat\")' />",
"<area id='mapNatID' alt='' title='Nat' shape='rect' coords='0,449,375,474' onclick='EnergiekonzeptFunction(\"Nat\")' />",
"<area id='mapAuxGasBoilerID' alt='' title='AuxgasBoiler' shape='rect' coords='203,407,261,445' onclick='EnergiekonzeptFunction(\"Aux Gas Boiler\")' />",
"<area id='mapAuxHeaterID' alt='' title='AuxHeater' shape='rect' coords='293,254,353,291' onclick='EnergiekonzeptFunction(\"Aux Heater\")' />",
"<area id='mapHeatPumpID' alt='' title='HeatPump' shape='rect' coords='106,231,166,268' style='outline:none;' onclick='EnergiekonzeptFunction(\"Heat Pump\")' />",
"<area id='mapTubID' alt='' title='tub' shape='rect' coords='208,331,268,373' style='outline:none;' onclick='EnergiekonzeptFunction(\"Tub\")' />",
"<area id='mapTankID' alt='' title='Tank' shape='rect' coords='31,286,69,332' style='outline:none;' onclick='EnergiekonzeptFunction(\"Tank\")' />",
"<area id='mapHouseWaterID' alt='' title='HouseWater' shape='rect' coords='220,265,258,311' style='outline:none;' onclick='EnergiekonzeptFunction(\"House Water\")' />",
"<area id='mapHouseElec' alt='' title='HouseElec' shape='rect' coords='216,153,257,199' style='outline:none;' onclick='EnergiekonzeptFunction(\"House with Lightning\")' />",
"<area id='mapSolarpanelID' alt='' title='Solarpanel' shape='rect' coords='54,0,91,39' style='outline:none;' onclick='EnergiekonzeptFunction(\"Solarpanel\")' />",
"<area id='mapBatterieID' alt='' title='Batterie' shape='rect' coords='234,2,282,43' style='outline:none;' onclick='EnergiekonzeptFunction(\"Batterie\")' />",
"</map>",
"</div>",
"<% %>"
],
"minTop": "balloonHeight + 10",
"minLeft": "70",
"layerTypes": [
""
],
"layerNames": [
"ProjektOne"
]
},
{
"template": [
"<div class='balloon' onclick='showtourSpecific()' id='myBalloon'>",
" <h1 class='balloon-title'>Station 2</h1>",
" <div class='balloon-content' style='height:290px; margin-right: 0px;'",
" </div>",
"<p class='balloon-text'><span>hier wurde eine Gartenkiosk errichtet.</span><br></p>",
"<img style='padding-top:10px' src='images/content/contentboeckingerstrasse/station2_gartenkiosk.jpg' alt='Simply Easy Learning' width='375'>",
"</div>",
"<% %>",
"<% openquestionaire() %>"
],
"minTop": "balloonHeight + 10",
"minLeft": "70",
"layerTypes": [
""
],
"layerNames": [
"LocationTwo"
]
},
{
"template": [
"<div class='balloon' onclick='showtourSpecific()' id='myBalloon'>",
" <h1 class='balloon-title'>Station 1</h1>",
" <div class='balloon-content' style='height:290px; margin-right: 0px;'",
" </div>",
"<p class='balloon-text'><span>hier wurde eine Spielekiosk errichtet.</span><br></p>",
"<img style='padding-top:10px' src='images/content/contentboeckingerstrasse/station1_spielekiosk.jpg' alt='Simply Easy Learning' width='375'>",
"</div>",
"<% %>",
"<% openquestionaire() %>"
],
"minTop": "balloonHeight + 10",
"minLeft": "70",
"layerTypes": [
""
],
"layerNames": [
"LocationOne"
]
},
{
"template": [
"<div class='balloon' onclick='showtourSpecific()' id='myBalloon'>",
" <h1 class='balloon-title'>Station 3</h1>",
" <div class='balloon-content' style='height:290px; margin-right: 0px;'",
" </div>",
"<p class='balloon-text'><span>hier wurde eine Outdoorkiosk errichtet.</span><br></p>",
"<img style='padding-top:10px' src='images/content/contentboeckingerstrasse/station3_outdoorkiosk1.jpg' alt='Simply Easy Learning' width='375'>",
"</div>",
"<% %>",
"<% openquestionaire() %>"
],
"minTop": "balloonHeight + 10",
"minLeft": "70",
"layerTypes": [
""
],
"layerNames": [
"LocationThree"
]
},
{
"template": [
"<div class='balloon' onclick='showtourSpecific()' id='myBalloon'>",
" <h1 class='balloon-title'>Station 4</h1>",
" <div class='balloon-content' style='height:290px; margin-right: 0px;'",
" </div>",
"<p class='balloon-text'><span>hier wurde eine Infokiosk errichtet.</span><br></p>",
"<img style='padding-top:10px' src='images/content/contentboeckingerstrasse/station4_Infokiosk.jpg' alt='Simply Easy Learning' width='375'>",
"</div>",
"<% %>",
"<% openquestionaire() %>"
],
"minTop": "balloonHeight + 10",
"minLeft": "70",
"layerTypes": [
""
],
"layerNames": [
"LocationFour"
]
}
],
"excludedLayerNames": []
},
{
"type": "vcs.vcm.widgets.Copyright"
},
{
"low": {
"sse": 4,
"fxaa": false,
"fog": {
"enabled": true
},
"resolutionScale": 0.9,
"layerSSEFactor": 2
},
"medium": {
"sse": 2.333,
"fxaa": false,
"fog": {
"enabled": true
},
"resolutionScale": 1,
"layerSSEFactor": 1.1
},
"high": {
"sse": 1.3333333333333333,
"fxaa": true,
"fog": {
"enabled": true
},
"resolutionScale": 1,
"layerSSEFactor": 0.5
},
"defaultQualityLevel": "medium",
"showAdvancedSettings": false,
"type": "vcs.vcm.widgets.DisplayQuality"
},
{
"color": [
255,
152,
0
],
"opacity": 0.8,
"pointRadius": 5,
"width": 5,
"type": "vcs.vcm.widgets.Drawing"
},
{
"type": "vcs.vcm.widgets.CreateLink",
"name": "Link Creator"
},
{
"type": "vcs.vcm.widgets.Locator",
"name": "Locator",
"zoomDistance": 1000,
"style": {
"image": {
"circle": {
"fill": {
"color": "rgba(255,255,255,1.0)"
},
"stroke": {
"color": "rgba(0,0,0,1.0)",
"width": 1
},
"radius": 5
}
}
}
},
{
"type": "vcs.vcm.widgets.Measurement",
"name": "Measurements",
"style": {
"fill": {
"color": [
255,
255,
255,
0.4
]
},
"stroke": {
"color": [
51,
153,
204,
1
],
"width": 1.25,
"lineDash": null
},
"text": {
"font": "18px sans-serif",
"fill": {
"color": [
51,
51,
51,
1
]
},
"textBaseline": "bottom",
"offsetY": -15,
"offsetX": 0
},
"image": {
"scale": 1,
"fill": {
"color": [
255,
255,
255,
0.4
]
},
"radius": 5,
"stroke": {
"color": [
0,
0,
0,
1
],
"width": 1,
"lineDash": null
}
}
},
"decimalPlaces": 1
},
{
"type": "vcs.vcm.widgets.NavigationControls",
"name": "NavigationControls",
"zoomFactor": 2,
"moveFactor": 1.5,
"animationDuration": 0.5,
"tiltFactor": 10,
"animation": true,
"showZoomButtons": true,
"showTiltButtons": true,
"showHomeButton": true,
"showCompass": true,
"rotationPerFrame": 0.5
},
{
"useLocalCRS": false,
"type": "vcs.vcm.widgets.Planning",
"serviceUrl": "http://smartvillages.online/",
"projectId": "Q4at5xXnP93Erwtm5",
"scenarioId": "2JQ3od8igw4LRzTR5",
"userLocalCRS": true
},
{
"type": "vcs.vcm.widgets.OverviewMap",
"name": "Overview Map",
"layerName": "Openstreetmap layer",
"minimumHeight": 150,
"cameraIcon": "",
"activeOnStartup": false
},
{
"type": "vcs.vcm.widgets.PDFCreator",
"name": "PDF Creator"
},
{
"type": "vcs.vcm.widgets.Questionnaire",
"name": "Questionnaire"
},
{
"type": "vcs.vcm.widgets.PositionDisplay",
"name": "Position Display",
"positionDecimalPlaces": 2,
"template": null
},
{
"type": "vcs.vcm.widgets.search.Search",
"name": "Search",
"autocomplete": false,
"autocompleteRequest": null,
"resultIcon": null,
"searchImplementations": [
{
"type": "vcs.vcm.widgets.search.Nominatim",
"name": "a62716d9-1453-4498-87ba-4c887ec49951",
"url": "https://nominatim.openstreetmap.org/search",
"city": null,
"state": null,
"countrycode": "de",
"extent": null,
"limit": 20
}
],
"extendedSearches": [],
"showSearchResultToolbar": false
},
{
"type": "vcs.vcm.widgets.Shadow",
"name": "Shadows",
"activateShadowsOnStartup": false,
"timezone": null
},
{
"type": "vcs.vcm.widgets.TransparentTerrainMode",
"name": "Transparent terrain mode"
},
{
"type": "vcs.vcm.widgets.legend.Legend",
"children": [
{
"type": "vcs.vcm.widgets.legend.GroupItem",
"title": "Positionen",
"clickable": true,
"startOpen": false,
"children": [
{
"type": "vcs.vcm.widgets.legend.ViewpointItem",
"viewpointName": "Böckingerstraße",
"infoUrl": "",
"title": "Böckingerstraße"
},
{
"type": "vcs.vcm.widgets.legend.ViewpointItem",
"viewpointName": "startview",
"infoUrl": "",
"title": "Stöckach"
}
]
}
]
}
],
"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},
{
"name": "Böckingerstrasse",
"url": "./datasource-data/f02945f6-7978-4abc-940b-4c47af169b12/tileset.json",
"type": "vcs.vcm.layer.cesium.Buildings",
"datasourceId": "zECwoSwXppPMrqfbt",
"activeOnStartup": false,
"exclusive": false,
"allowPicking": true,
"screenSpaceError": 16,
"screenSpaceErrorMobile": 32,
"hiddenObjectIds": [],
"copyright": {
"provider": "",
"url": "",
"year": ""
}
},{
"name": "Stuttgart",
"url": "http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD1_Georocket/tileset.json",
"type": "vcs.vcm.layer.cesium.Buildings",
"datasourceId": "zECwoSwXppPMrqfSt",
"activeOnStartup": false,
"exclusive": false,
"allowPicking": true,
"screenSpaceError": 16,
"screenSpaceErrorMobile": 32,
"hiddenObjectIds": [],
"copyright": {
"provider": "",
"url": "",
"year": ""
}
},{
"name": "StuttgartLocal",
"url": "./datasource-data/Stuttgart/tileset.json",
"type": "vcs.vcm.layer.cesium.Buildings",
"datasourceId": "zECwoSwXppPMrqfLoc",
"activeOnStartup": true,
"exclusive": false,
"allowPicking": true,
"screenSpaceError": 16,
"screenSpaceErrorMobile": 32,
"hiddenObjectIds": [],
"copyright": {
"provider": "",
"url": "",
"year": ""
}
},{
"name": "Rosenstein",
"url": "./datasource-data/Rosenstein/tileset.json",
"type": "vcs.vcm.layer.cesium.Buildings",
"datasourceId": "zECwoSwXppPMrqfRos",
"activeOnStartup": false,
"exclusive": false,
"allowPicking": true,
"screenSpaceError": 16,
"screenSpaceErrorMobile": 32,
"hiddenObjectIds": [],
"copyright": {
"provider": "",
"url": "",
"year": ""
}
},
{
"name": "Stöckach",
"url": "./datasource-data/Stockach/tileset.json",
"type": "vcs.vcm.layer.cesium.Buildings",
"datasourceId": "orpdK9eKzTLaDmYC9",
"activeOnStartup": false,
"exclusive": false,
"allowPicking": true,
"screenSpaceError": 16,
"screenSpaceErrorMobile": 32,
"hiddenObjectIds": ["DEBW522AA00022dcc","DEBW522AA0003bf3b","DEBW522AA0000976a","DEBW522AA00001d00"],
"copyright": {
"provider": "",
"url": "",
"year": ""
}
},{
"name": "StuttgartPart",
"url": "./datasource-data/PartOfStuggi/tileset.json",
"type": "vcs.vcm.layer.cesium.Buildings",
"datasourceId": "orpdK9eKzTLaDmStu",
"activeOnStartup": true,
"exclusive": false,
"allowPicking": true,
"screenSpaceError": 16,
"screenSpaceErrorMobile": 32,
"hiddenObjectIds": [],
"copyright": {
"provider": "",
"url": "",
"year": ""
}
},
{
"name": "Openstreetmap layer",
"type": "vcs.vcm.layer.OpenStreetMap",
"exclusive": "base",
"activeOnStartup": true,
"copyright": {
"provider": "OpenStreetMap contributors",
"url": "http://www.openstreetmap.org/",
"year": "2018"
},
"hiddenObjectIds": [],
"opacity": ""
},
{
"type": "vcs.vcm.layer.Wms",
"name": "WMS layer",
"activeOnStartup": true,
"exclusive": false,
"url": "https://gis5.stuttgart.de/arcgis/services/1_Base/WMS_Luftbilder_aktuell/MapServer/WmsServer",
"parameters": "",
"maxLevel": 18,
"tilingSchema": "geographic",
"datasourceId": "",
"hiddenObjectIds": [],
"copyright": {
"provider": "",
"url": "",
"year": ""
},
"version": "",
"layers": "0",
"extent": {
"coordinates": [
null,
null,
null,
null
],
"epsg": "",
"proj4": ""
},
"featureInfo": null,
"opacity": ""
},{
"name": "B",
"url": "./templates/AreaB.geojson",
"type": "vcs.vcm.layer.GeoJSON",
"datasourceId": "...",
"activeOnStartup": false,
"exclusive": false,
"projection": {
"epsg": "4326",
"proj4": ""
},
"altitudeMode": "relativeToGround",
"style": {
"image": {
"icon": {
"src": "",
"scale": 0.5
}
}
},
"heightAboveGround": 0
},{
"name": "C1",
"url": "./templates/AreaC1.geojson",
"type": "vcs.vcm.layer.GeoJSON",
"datasourceId": "...",
"activeOnStartup": false,
"exclusive": false,
"projection": {
"epsg": "4326",
"proj4": ""
},
"altitudeMode": "relativeToGround",
"style": {
"image": {
"icon": {
"src": "",
"scale": 0.5
}
}
},
"heightAboveGround": 0
},{
"name": "ProjektOne",
"url": "./templates/ProjektOne.geojson",
"type": "vcs.vcm.layer.GeoJSON",
"datasourceId": "...",
"activeOnStartup": true,
"exclusive": false,
"projection": {
"epsg": "4326",
"proj4": ""
},
"altitudeMode": "relativeToGround",
"style": {
"image": {
"icon": {
"src": "./templates/lightning.png",
"scale": 0.5
}
}
},
"heightAboveGround": 0
},{
"name": "ProjektNord",
"url": "./templates/ProjektNord.geojson",
"type": "vcs.vcm.layer.GeoJSON",
"datasourceId": "...",
"activeOnStartup": true,
"exclusive": false,
"projection": {
"epsg": "4326",
"proj4": ""
},
"altitudeMode": "relativeToGround",
"style": {
"image": {
"icon": {
"src": "./templates/building.png",
"scale": 0.5
}
}
},
"heightAboveGround": 0
},{
"name": "Questionnaire",
"url": "./templates/Questionnaire.geojson",
"type": "vcs.vcm.layer.GeoJSON",
"datasourceId": "...",
"activeOnStartup": true,
"exclusive": false,
"projection": {
"epsg": "4326",
"proj4": ""
},
"altitudeMode": "relativeToGround",
"style": {
"image": {
"icon": {
"src": "./templates/locationQ.png",
"scale": 0.5
}
}
},
"heightAboveGround": 0
},
{
"name": "LocationOne",
"url": "./templates/locationOne.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": "LocationTwo",
"url": "./templates/locationTwo.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": "LocationThree",
"url": "./templates/locationThree.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": "LocationFour",
"url": "./templates/locationFour.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
}
],
"viewpoints": [
{
"name": "startview",
"cameraPosition": [
9.294727619997023,
48.743362022865426,
17217.87421017033
],
"groundPosition": [
9.223110265588412,
48.798931778699455,
-0.0021814601362642612
],
"distance": 19040.337418120638,
"heading": 319.600536492729,
"pitch": -64.76308830002756,
"roll": 359.7083867950233,
"animate": false
},{
"name": "stockach",
"cameraPosition": [
9.19880981069925,
48.78073258586779,
557.8946752995696
],
"groundPosition": [
9.20002319296369,
48.78831698706695,
-0.004286617007779517
],
"distance": 1015.2020567756226,
"heading": 6.034472681516794,
"pitch": -33.33958313017551,
"roll": 0.02406619855133695,
"animate": false
},
{
"name": "Böckingerstraße",
"cameraPosition": [
9.196550599393404,
48.83261067736586,
268.60746701465376
],
"groundPosition": [
9.195449041197556,
48.83618443627386,
-0.002184380990085289
],
"distance": 486.4616122371815,
"heading": 348.4986469535158,
"pitch": -33.51784735784641,
"roll": 359.9542703265667,
"animate": true
},
{
"name": "NordBView",
"cameraPosition": [
9.196706687392629,
48.787236688854634,
452.8161295397872
],
"groundPosition": [
9.197929833190297,
48.7971060262033,
-0.004254466513807599
],
"distance": 1190.703214339934,
"heading": 4.680790508536784,
"pitch": -22.356993435657433,
"roll": 0.016861192553048996,
"animate": true
}
]
}
\ 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.193587, 48.835579 ] } }
]
}
{ "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.195387, 48.835579 ] } } ] }
\ 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.195387, 48.835579 ] } } ] }
\ No newline at end of file
var ballonContent = {
header: "Test",
Content: "This is a test",
lat: "",
lon: "",
categorie: ""
}
function PostUserInput(){
try {
$.ajax({
async: false,
type: "POST",
url: '/newBallon',
data: ballonContent
}).done(function (SimSMid) {
return(SimSMid)
// convertdata(SimSMid);
});
// function convertdata(SimSMids) {
// SimSOutput = SimSMids;
// }
// // console.log(currentwind);
// return SimSOutput;
}
catch (err) {
console.log('-> function PostUserInput() failed!\n' + err);
}
}
\ 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