Commit 924a6176 authored by Pettersson Tomas's avatar Pettersson Tomas
Browse files

help

parent d8065acc
......@@ -46,7 +46,7 @@ Open browser on http://localhost:8080/demo
"tLogout" : "Logout"
};
var navControl = new N2("navigation", {
var navControl = new Navigation("navigation", {
"user" : {
"name" : "Firstname Surname",
"id" : "k000000",
......
......@@ -105,7 +105,7 @@
"tLogout" : "Logout"
};
var navControl = new N2("navigation", {
var navControl = new Navigation("navigation", {
"user" : {
"name" : "Firstname Surname",
"id" : "k000000",
......
......@@ -31,10 +31,6 @@ app.get('/demo/logout', function (req, res) {
res.sendStatus(200);
});
app.get('/demo/test', function (req, res) {
res.send('{"results": [{"title":"Article title", "url":"#", "text":"Lorem ipsum dolor sit amet, consectetur ..."}]}');
});
app.post('/demo/search', function (req, res) {
var result = {};
result["results"] = [];
......@@ -45,7 +41,7 @@ app.post('/demo/search', function (req, res) {
for (var i = 0; i < json.length; i++) {
var uikitloc = {};
var loc = json[i];
uikitloc["url"] = "#9/"+loc["lat"]+"/"+loc["lon"];
uikitloc["url"] = "#7/"+loc["lat"]+"/"+loc["lon"];
uikitloc["title"] = req.body.search;
uikitloc["text"] = loc["display_name"];
result["results"].push(uikitloc);
......@@ -56,11 +52,6 @@ app.post('/demo/search', function (req, res) {
})
});
app.post('/demo/search2', function (req, res) {
console.log(req.body.search);
res.send('{"results": [{"title":"Stockholm", "url":"#11/59.3187/18.0303", "text":"Lorem ipsum dolor sit amet, consectetur ..."}, {"title":"Linköping", "url":"#11/58.4166/15.5886", "text":"Lorem ipsum dolor sit amet, consectetur ..."}]}');
});
var upload = multer();
// file name must be same as input field name
......@@ -74,6 +65,7 @@ app.post('/demo/geojson', file, function(req, res, next) {
app.use('/bower_components', express.static(path.join(__dirname, '../bower_components')));
app.use('/src', express.static(path.join(__dirname, '../src')));
app.use('/dist', express.static(path.join(__dirname, '../dist')));
app.use('/demo/help', express.static(path.join(__dirname, '../src/help')));
app.use('/demo', express.static(__dirname));
app.listen(8080);
......
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