Commit 11384de7 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

test

parent 1ee43781
......@@ -39,12 +39,12 @@ module.exports = function(grunt) {
demo: {
includeSelf: true,
src: ['demo/index.html'],
overrides : {
"leaflet-itracer-control" : {
"main" : [
"src/leaflet-itracer-cards.js", "src/leaflet-oilitracerobs-control.js" , "src/leaflet-itracer-control.css"
]
},
overrides : {
"leaflet-itracer-control" : {
"main" : [
"src/leaflet-itracer-cards.js", "src/leaflet-itracer-control.js" , "src/leaflet-itracer-control.css"
]
},
"uikit-stw": {
"main" : [
"js/uikit.js", "js/components/notify.min.js",'js/components/datepicker.min.js','js/components/timepicker.min.js','js/components/autocomplete.min.js','js/components/accordion.min.js',
......@@ -68,8 +68,11 @@ module.exports = function(grunt) {
},
"leaflet-forcing-boundary" : {
"main" : ["dist/leaflet-forcing-boundary.js"]
}
}
},
"stwkit" : {
"main" : ["src/stwkit.js", "src/components/cards.js", "src/components/cards.css"]
}
}
}
}
......
......@@ -2,7 +2,7 @@
<html lang="en" style="font-size: 100%">
<head>
<title>leaflet-oilobs-control - Demo</title>
<title>leaflet-itracer-control - Demo</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv='x-dns-prefetch-control' content='on'>
......@@ -20,6 +20,7 @@
<link rel="stylesheet" href="../bower_components/uikit-stw/css/components/accordion.almost-flat.min.css" />
<link rel="stylesheet" href="../bower_components/ion.rangeSlider/css/ion.rangeSlider.css" />
<link rel="stylesheet" href="../bower_components/ion.rangeSlider/css/ion.rangeSlider.skinNice.css" />
<link rel="stylesheet" href="../bower_components/stwkit/src/components/cards.css" />
<link rel="stylesheet" href="../bower_components/leaflet-container-control/dist/leaflet-container-control.css" />
<link rel="stylesheet" href="../bower_components/DataTables/media/css/jquery.dataTables.min.css" />
<link rel="stylesheet" href="../bower_components/DataTables/media/css/dataTables.uikit.min.css" />
......@@ -27,7 +28,7 @@
<link rel="stylesheet" href="../bower_components/leaflet.draw/dist/leaflet.draw.css" />
<link rel="stylesheet" href="../bower_components/leaflet-coordinates-control/dist/leaflet-coordinates-control.css" />
<link rel="stylesheet" href="../bower_components/intro.js/introjs.css" />
<link rel="stylesheet" href="../src/leaflet-oilobs-control.css" />
<link rel="stylesheet" href="../src/leaflet-itracer-control.css" />
<!-- endbower -->
</head>
......@@ -47,6 +48,7 @@
<script src="../bower_components/moment/moment.js"></script>
<script src="../bower_components/ion.rangeSlider/js/ion.rangeSlider.min.js"></script>
<script src="../bower_components/stwkit/src/stwkit.js"></script>
<script src="../bower_components/stwkit/src/components/cards.js"></script>
<script src="../bower_components/leaflet-container-control/dist/leaflet-container-control.js"></script>
<script src="../bower_components/jquery.inputmask/dist/jquery.inputmask.bundle.js"></script>
<script src="../bower_components/jquery-file-upload/js/vendor/jquery.ui.widget.js"></script>
......@@ -60,10 +62,8 @@
<script src="../bower_components/leaflet-coordinates-control/dist/leaflet-coordinates-control.js"></script>
<script src="../bower_components/leaflet-forcing-boundary/dist/leaflet-forcing-boundary.js"></script>
<script src="../bower_components/intro.js/intro.js"></script>
<script src="../src/leaflet-oilobs-cards.js"></script>
<script src="../src/leaflet-oilobs-control.js"></script>
<script src="../src/leaflet-observation.js"></script>
<script src="../src/leaflet-observation-sat.js"></script>
<script src="../src/leaflet-itracer-cards.js"></script>
<script src="../src/leaflet-itracer-control.js"></script>
<!-- endbower -->
<script>
......@@ -80,7 +80,7 @@
map.addControl(containerControl);
var language = 'en';
var oilobsLangData = {
var itracerLangData = {
};
var coordinatesLangData = {
......@@ -125,7 +125,7 @@
};
var langData = {
"oilobs": oilobsLangData,
"itracer": itracerLangData,
"coordinates": coordinatesLangData
};
......@@ -135,10 +135,6 @@
"domain": "NS02"
};
var obs = {
"sat": true
};
var domainname = "HELCOM";
reqwest({
......@@ -146,15 +142,14 @@
method: 'get',
type: 'json',
success: function (forcing) {
var ooproperties = {
var itracerproperties = {
"domain" : domainname,
"lang": language,
"langdata": langData
};
if (forcing.features.length > 0) ooproperties["forcing"] = forcing;
ooproperties["obs"] = obs;
var oilobs = new L.Control.OilObs(ooproperties);
containerControl.addComponent("Oil observation", oilobs);
if (forcing.features.length > 0) itracerproperties["forcing"] = forcing;
var itracer = new L.Control.InstantTracer(itracerproperties);
containerControl.addComponent("Instant Tracer", itracer);
}
});
......
......@@ -21,8 +21,8 @@ app.get('/demo/input/785b50c5-4804-462d-8a24-1dc2c9fd14f8', function (req, res)
"type": "Feature",
"properties": {
"uuid": "785b50c5-4804-462d-8a24-1dc2c9fd14f8",
"type": "oil",
"subtype": "observation",
"type": "object",
"subtype": "itracer",
"meanLng": 20.214843749999996,
"meanLat": 58.95000823335702,
"simulation": {
......@@ -74,8 +74,8 @@ app.get('/demo/input/24ef2cac-ef78-406c-b59a-db625f38919e', function (req, res)
"uuid": "24ef2cac-ef78-406c-b59a-db625f38919e",
"domain": "HELCOM",
"model": "NEMO",
"type": "oil",
"subtype": "observation",
"type": "object",
"subtype": "itracer",
"meanLng": 20.522460937500004,
"meanLat": 58.51665179936381,
"simulation": {
......@@ -127,20 +127,20 @@ app.get('/demo/availableTimes/ms/HELCOM_NEMO', function (req, res) {
);
});
app.post('/demo/startoo', function (req, res) {
app.post('/demo/startit', function (req, res) {
var result = {};
console.log(req.body.features[0].properties);
result["id"] = "uuid";
res.send(result);
});
app.get('/demo/guide/oo',
app.get('/demo/guide/it',
function (req, res) {
res.send(
{
steps: [
{
intro: "This guide will take you through the steps needed to start an Oil observation simulation."
intro: "This guide will take you through the steps needed to start an Instant Tracer simulation."
},
{
element: '#guideoo1',
......
declare var STWkit : any;
\ No newline at end of file
declare namespace STWkit{
export var DomUtil: any;
export var getParamIndex: any;
export var getURLParams: any;
export var hasParam: any;
export var replaceParam: any;
export var updateUrl: any;
export var deleteParam: any;
export var getSearchUrl: any;
export var getParamValue: any;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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