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

test

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