",
+ thumbnail:'http://dorsal.aemet.es:8080/adaguc-services//adagucserver?dataset=CT&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=CT_ct,overlay&WIDTH=400&HEIGHT=350&CRS=EPSG:4326&BBOX=25,-20,46,10&FORMAT=image/png&TRANSPARENT=TRUE',
+ dataChooserConfiguration: dataChooserConfigurationMSGSAF
+ },
+]
+//----------------------------------------FIN CARPETA TEL ----------------------------------------------
+
+//----------------------------------------CARPETA NWP --------------------------------------------------
+//Contenido carpeta del menu NWP
+var dataChooserConfigurationFoldersNWP = [
+ {
+ title:"NWP",
+ thumbnail:'./img/open-file-folder.png',
+ dataChooserConfiguration: dataChooserConfigurationNWP
+ }
+]
+//---------------------------------------FIN CARPETA NWP ------------------------------------------------
+
+//Definimos el nombre y contenido de los botones de la toolbar
+var dataChooser =[
+ /* {
+ title: "NWP",
+ dataChooserConfiguration: dataChooserConfigurationNWP
+ }*/
+];
+
+//Definimos el nombre y el contenido de las carpetas de la toolbar
+var folderChooser =[
+ {
+ title: "NWP",
+ dataChooserConfigurationFolder: dataChooserConfigurationFoldersNWP
+ },
+ {
+ title: "MSG",
+ dataChooserConfigurationFolder: dataChooserConfigurationFoldersMSG
+ },
+ {
+ title: "OBS",
+ dataChooserConfigurationFolder: dataChooserConfigurationFoldersOBS
+ },
+ {
+ title: "TEL",
+ dataChooserConfigurationFolder: dataChooserConfigurationFoldersTEL
+ }
+];
+
+
+var mapTypeConfiguration = [ {
title: "World WGS84",
bbox: [-180, -90, 180, 90],
srs: "EPSG:4326",
@@ -130,12 +1807,7 @@ var mapTypeConfiguration = [
name: "WorldMap",
type: "twms",
},
- } /*{
- title: 'Mollweide (7399)',
- bbox: [-18157572.744146045,-11212941.682924412,18085661.018022258,11419683.192411266],
- srs: 'EPSG:7399',
- baselayer:{service:'https://geoservices.knmi.nl/cgi-bin/bgmaps.cgi?',name:'naturalearth2',type: 'wms'}
- },*/,
+ },
{
title: "Robinson",
bbox: [
@@ -227,76 +1899,16 @@ var mapTypeConfiguration = [
type: "twms",
},
},
- {
- title: "North America",
- bbox: [
- -2015360.8716608454,
- -697107.5349683464,
- 9961718.159421016,
- 6782157.107682772,
- ],
- srs: "EPSG:50001",
- baselayer: {
- service: "",
- name: "NaturalEarth2",
- type: "twms",
- },
- },
-
- {
- title: "Openstreetmap NL",
- bbox: [220000, 6500000, 1000000, 7200000],
- srs: "EPSG:3857",
- baselayer: {
- service: "",
- name: "OpenStreetMap_Service",
- type: "twms",
- },
- } /*{
- title: 'PDOK BRT NL',
- bbox: [-350000,125000,700000,900000],
- srs: 'EPSG:28992',
- baselayer:{service:'https://geoservices.knmi.nl/cgi-bin/bgmaps.cgi?',name:'streetmap',type: 'wms'}
- },*/ /*{
- title: 'Openstreetmap Schiphol',
- bbox: [515813.2988839851,6850485.5537392385,544160.8241851525,6869318.449956324],
- srs: 'EPSG:3857',
- baselayer:{service:'https://geoservices.knmi.nl/cgi-bin/bgmaps.cgi?',name:'streetmap',type: 'wms'}
- }*/,
-
- /*,{
- title: 'The Netherlands (28992)',
- bbox: [-350000,125000,700000,900000 ],
- srs: 'EPSG:28992',
- baselayer:{service:'https://geoservices.knmi.nl/cgi-bin/bgmaps.cgi?',name:'naturalearth2',type: 'wms'}
- },*/
-
- /*,{
- title: 'Schiphol Satellite + Aerial Mercator',
- bbox: [522402.16196646384,6852917.910540686,537831.8792436487,6863959.075064662],
- srs: 'EPSG:3857',
- baselayer:{service:'http://birdexp03.knmi.nl/cgi-bin/plieger/wmst.cgi?',name:'satellite'}
- },{
- title: 'Topographic Mercator in NL',
- bbox: [220000,6500000,1000000,7200000],
- srs: 'EPSG:3857',
- baselayer:{service:'http://birdexp03.knmi.nl/cgi-bin/plieger/wmst.cgi?',name:'topo'}
- },{
- title: 'Canvas Mercator in NL',
- bbox: [220000,6500000,1000000,7200000],
- srs: 'EPSG:3857',
- baselayer:{service:'http://birdexp03.knmi.nl/cgi-bin/plieger/wmst.cgi?',name:'canvas'}
- }*/
+
];
-var defaultLanguage = { language: "en" }; // <-- Language for the ADAGUC viewer.
+var defaultLanguage = { language: 'en' }; // <-- Language for the ADAGUC viewer.
var defaultUsernameSearch = "adaguc"; // <-- Username for the GeoNames API. 1
-var geoNamesURL =
- "http://api.geonames.org/search?q={searchTerm}&username={username}&maxRows=1"; // <-- URL for the GeoNames API. Requires 'defaultUsernameSearch'
+var geoNamesURL = "http://api.geonames.org/search?q={searchTerm}&username={username}&maxRows=1"; // <-- URL for the GeoNames API. Requires 'defaultUsernameSearch'
var webMapJSSettings = {
- enableTouchDevice: true,
-};
+ enableTouchDevice:true
+}
//FOR JSP:
/*
@@ -305,21 +1917,77 @@ var requestProxy = "/impactportal/AdagucViewer?SERVICE=PROXY&";
*/
//For PHP:
-var requestProxy = "./webmapjs_php/MakeRequest.php?";
-var xml2jsonrequestURL = "./webmapjs_php/xml2jsonrequest.php?";
-
-// getFeatureInfoApplications.push({name:'EProfile',iconCls:'button_getfeatureinfo'});
-getFeatureInfoApplications.push({
- name: "AutoWMS",
- iconCls: "button_getfeatureinfo",
-});
+var requestProxy = "./webmapjs_php/MakeRequest.php?";
+var xml2jsonrequestURL = "./webmapjs_php/xml2jsonrequest.php?"
+
+//getFeatureInfoApplications.push({name:'EProfile',iconCls:'button_getfeatureinfo'});
+getFeatureInfoApplications.push({name:'AutoWMS',iconCls:'button_getfeatureinfo'});
getFeatureInfoApplications.open = "AutoWMS";
-// getFeatureInfoApplications.open = 'EProfile';
+//getFeatureInfoApplications.push({name:'Sondeo',iconCls:'button_getfeatureinfo',location:'apps/tddjs.html'});
+//getFeatureInfoApplications.open = 'EProfile';
// xml2jsonrequestURL = 'http://localhost:8080/adaguc-services/xml2json?'
// autowmsURL = 'http://localhost:8080/adaguc-services/autowms?';
// getFeatureInfoApplications.push({name:'AutoWMS',iconCls:'button_getfeatureinfo'});
var WMJSTileRendererTileSettings = {
+
+ OSM: {
+ 'EPSG:3857': {
+ home: 'https://b.tile.openstreetmap.org/',
+ minLevel: 1,
+ maxLevel: 16,
+ tileServerType: 'osm',
+ copyRight: 'Open Street Map'
+ },
+ 'EPSG:28992': {
+ home: 'http://services.arcgisonline.nl/ArcGIS/rest/services/Basiskaarten/PDOK_BRT/MapServer/tile/',
+ minLevel: 1,
+ maxLevel: 12,
+ origX:-285401.92,
+ origY:903401.92,
+ resolution:3440.64,
+ tileServerType: 'arcgisonline',
+ copyRight: 'Basiskaart bronnen: PDOK, Kadaster, OpenStreetMap'
+ }
+ },
+ TERRAIN: {
+ 'EPSG:3857': {
+ home: 'http://d.tile.stamen.com/terrain/',
+ minLevel: 1,
+ maxLevel: 20,
+ tileServerType: 'osm',
+ copyRight: 'Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL.'
+ },
+ 'EPSG:28992': {
+ home: 'http://services.arcgisonline.nl/ArcGIS/rest/services/Basiskaarten/PDOK_BRT/MapServer/tile/',
+ minLevel: 1,
+ maxLevel: 12,
+ origX:-285401.92,
+ origY:903401.92,
+ resolution:3440.64,
+ tileServerType: 'arcgisonline',
+ copyRight: 'Basiskaart bronnen: PDOK, Kadaster, OpenStreetMap'
+ }
+ },
+ LITE: {
+ 'EPSG:3857': {
+ home: 'http://b.tile.stamen.com/toner-lite/',
+ minLevel: 1,
+ maxLevel: 20,
+ tileServerType: 'osm',
+ copyRight: 'Open Street Map'
+ },
+ 'EPSG:28992': {
+ home: 'http://services.arcgisonline.nl/ArcGIS/rest/services/Basiskaarten/PDOK_BRT/MapServer/tile/',
+ minLevel: 1,
+ maxLevel: 12,
+ origX:-285401.92,
+ origY:903401.92,
+ resolution:3440.64,
+ tileServerType: 'arcgisonline',
+ copyRight: 'Basiskaart bronnen: PDOK, Kadaster, OpenStreetMap'
+ }
+ },
WorldMap_Light_Grey_Canvas: {
"EPSG:3857": {
home:
@@ -468,7 +2136,7 @@ var WMJSTileRendererTileSettings = {
tileServerType: "osm",
copyRight: "Natural Earth II | Ingmapping",
},
- "EPSG:3575": {
+ "EPSG:3575-disabled": {
home:
"https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG3575/",
minLevel: 5,
@@ -691,4 +2359,9 @@ var WMJSTileRendererTileSettings = {
copyRight: "NPS - Natural Earth II",
},
},
+
};
+
+xml2jsonrequestURL = '/adaguc-services/xml2json?'
+autowmsURL = '/autowms?';
+//autowmsURL = '/autowms?';
diff --git a/Docker/config.php b/Docker/config.php
index 2f7521e..6367f7c 100644
--- a/Docker/config.php
+++ b/Docker/config.php
@@ -15,7 +15,6 @@
"http://behemoth.nerc-essc.ac.uk/",
"http://bhlbontw.knmi.nl",
"http://webgis.nmdc.eu",
- "https://geoservices.knmi.nl",
"http://wms.met.no/",
"http://synopsis1.meteo.fr",
"http://www.dinoservices.nl",
@@ -52,28 +51,21 @@
"http://birdexp02.knmi.nl/",
"http://www.ecad.eu/",
"http://bhlgsie01.knmi.nl/",
- "http://bhw512.knmi.nl",
- "http://adaguc-server"
+ "http://bhw512.knmi.nl"
);
-
-
function replaceHostName($url){
- $localaddr = getenv('LOCAL_ADAGUCSERVER_ADDR');
- $remoteaddr = getenv('REMOTE_ADAGUCSERVER_ADDR');
+ // Some firewalls do not allow to request data from their own server. In this case the hostname should be changed to localhost
+ //$HOSTNAME=gethostbyaddr (gethostbyname ($_SERVER["SERVER_NAME"]));
+ //$url = str_replace($HOSTNAME,"localhost", $url);
+ //$url = str_replace("https://data.knmi.nl/wms","http://kdc-preview.knmi.nl:8380",$url);
+ //$url = str_replace("http://data.knmi.nl/wms","http://kdc-preview.knmi.nl:8380", $url);
+ $url = str_replace("cib-dev.knmi.nl","bvle4m02", $url);
- if ($localaddr != FALSE && $remoteaddr != FALSE) {
- $url = str_replace($localaddr,$remoteaddr, $url);
- }
return $url;
}
-
-
-
-
-
/*--- Now new line at the end of this file allowed --- */?>
diff --git a/Docker/index.html b/Docker/index.html
index e2eb6a4..488ba53 100644
--- a/Docker/index.html
+++ b/Docker/index.html
@@ -18,7 +18,14 @@
+
+
+
+
+
+
+
@@ -38,10 +45,6 @@
- var autowmsURL = '".getenv('ADAGUCSERVICES_AUTOWMS')."';";
- ?>
-
diff --git a/Dockerfile b/Dockerfile
index 1a63b1b..0e1084e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,10 +5,11 @@ WORKDIR /var/www/html
# Install adaguc-viewer from context
COPY . /var/www/html/adaguc-viewer
RUN rm -rf /var/www/html/adaguc-viewer/index.html
-COPY Docker/config.* /var/www/html/adaguc-viewer/
+COPY config_docker.js /var/www/html/adaguc-viewer/config.js
COPY Docker/index.html /var/www/html/adaguc-viewer/index.php
COPY Docker/redirtoindex.html /var/www/html/index.html
-ENV ADAGUCSERVICES_AUTOWMS="http://localhost:8090/adaguc-services/autowms?"
-
+ENV ADAGUCSERVICES_AUTOWMS="http://localhost:8090/autowms?"
+#RUN apt-get update
+#RUN apt-get -y install vim
diff --git a/VERSION b/VERSION
index abc6ae9..1fad116 100644
--- a/VERSION
+++ b/VERSION
@@ -1,3 +1,37 @@
-ADAGUC viewer version 4.0.1 2021-04-14
+Detached from: ADAGUC viewer version 4.0.1 2021-04-14
+ADAGUC-viewer version AEMET
http://adaguc.knmi.nl.
+
+Fichero de Control de version y cambios.
+AEMET 1.2.1.1
+06-03-2024: pluciag: Se corrige el bug, si la capa no tiene dimension tiempo se establece como tiempo de refresco 24H.
+ Se añade PT3M para el autorefresco.
+13-03-2024: pluciag: Se añade que se desactive el update al pulsar el boton de avanzar y retroceder en la capa que a veces daba problemas.
+ Se añade que se desactive el update al mover el slider de la capa.
+ Se hace que la actualizacion ocurra cuando el tiempo mayor de la capa sea diferente al default del WS (antes comparaba el tiempo cargado)
+23-04-2024: pluciag: Se añade al config.js las opciones de sync y auto_load
+ Se activa/desactiva el boton "Set time" de la capa si el checkbox de sincronizacion de tiempo se activa/desactiva
+ Se añade un "warning" en la herramienta de timeSelectorWindow para avisar que solo funciona sobre las capas con el checkbox activado.
+14-05-2024: pluciag: Se deja como unica funcion del boton de la derecha del raton la invocacion al contextmenu del navegador.
+ Se modifica el lugar en el codigo del logo.
+23-05-2024: pluciag: Se añade el modelo HARMONIE a la herramienta de sondeos.
+05-06-2024: pluciag: Se añade el sensor IASI-KRR a la herramienta de sondeos.
+07-06-2024: pluciag: Se mejora la herramienta de sondeos.
+ -Se quita la tabla y se sustituye por un enlace a las ventanas de los sondeos.
+ -Se mejora el codigo interno.
+ -Se permiten varias ventanas de sondeos simultaneas.
+24-06-2024: pluciag: Se modifica la libreria tdd.js para quitar las cabeceras OBSERVACION o Nombre del modelo y que calcule a r en funcion de si se lee q o no.
+25-06-2024: AEMET 1.1.2: pluciag: Se actualiza la libreria tdd.js para tener la ultima version (adaptada) y se añade licencia. "Estable"
+06-08-2024: AEMET 1.2.0: pluciag: Se modifica para que entienda que si hay dimension forecast_reference_time debe limitar la dimension tiempo.
+30-08-2024: AEMET 1.2.1: pluciag: Se actualiza el autoupdate para que si hay forecast_reference_time sea esta la que dispare la actualización.
+05-09-2024: AEMET 1.2.1.1: pluciag: Se mejora y se corrigen fallos al manejar la dimension forecast_reference_time.
+06-09-2024: AEMET 1.2.1.2: pluciag: Se añade el nombre en inglés VertProfiles a la aplicacion Sondeo.
+17-09-2024: AEMET 1.2.1.3: pluciag: El boton play mostrara el loop de todo el bucle si existe el forecast_reference_time, 24 slots si no.
+24-09-2024: AEMET 1.2.1.4: pluciag: Se corrige la herramienta de sondeos tddjs para que solo busque la cadena KRR y que funcione con los dataset de KRR
+25-09-2024: AEMET 1.2.1.5: pluciag: Se crea un menu en el panel este para poder abrir las app desde ahí.
+25-09-2024: AEMET 1.2.1.6: pluciag: Se añade la etiqueta KRF para los sondeos de satelite y se muestra la hora con minutos para estos sondeos.
+22-10-2024: AEMET 1.2.2: pluciag: Se corrige el fallo al manejar un unico fichero con forcast_reference_time en WMJSLayer.handleReferenceTime()
+23-10-2024: AEMET 1.2.3: pluciag: Se modifica el visor para que si se desfasa el reference_time, respecto al time, corrija el desfase. Ver DimensionPanel.checkReferenceTime().
+09-12-2024: AEMET 1.2.4: pluciag: Se añade a la herramienta de sondeos la etiqueta ASV_FCT para los sondeos de modelos en los puntos polares.
+16-12-2024: AEMET 1.2.4.1: pluciag: Se añaden los pngs para la nube europea
diff --git a/YRADAR.html b/YRADAR.html
new file mode 100644
index 0000000..1d000a8
--- /dev/null
+++ b/YRADAR.html
@@ -0,0 +1,25 @@
+
+
+
+ Sondeo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/autowms_app.css b/apps/autowms_app.css
index 56b11ad..d34b0fe 100644
--- a/apps/autowms_app.css
+++ b/apps/autowms_app.css
@@ -109,6 +109,13 @@
background-color:#DDF;
}
+.autowms_app_currentpath_hipa{
+ display:block;
+ margin:1px;
+ padding:5px;
+ background-color:#08F;
+}
+
.autowms_app_request_container{
width:100%;
display:flex;
@@ -149,4 +156,46 @@
.autowms_app_opendaplinks a {
padding:3px;
-}
\ No newline at end of file
+}
+
+/* Dropdown Button */
+.dropbtn {
+ background-color: #04AA6D;
+ color: white;
+ padding: 10px;
+ font-size: 10px;
+ border: none;
+}
+
+/* The container
- needed to position the dropdown content */
+.dropdown {
+ position: relative;
+ display: inline-block;
+}
+
+/* Dropdown Content (Hidden by Default) */
+.dropdown-content {
+ display: none;
+ position: absolute;
+ background-color: #f1f1f1;
+ min-width: 160px;
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
+ z-index: 1;
+}
+
+/* Links inside the dropdown */
+.dropdown-content a {
+ color: black;
+ padding: 12px 16px;
+ text-decoration: none;
+ display: block;
+}
+
+/* Change color of dropdown links on hover */
+.dropdown-content a:hover {background-color: #ddd;}
+
+/* Show the dropdown menu on hover */
+.dropdown:hover .dropdown-content {display: block;}
+
+/* Change the background color of the dropdown button when the dropdown content is shown */
+.dropdown:hover .dropbtn {background-color: #3e8e41;}
diff --git a/apps/autowms_app.js b/apps/autowms_app.js
index afb1953..36bfa0c 100644
--- a/apps/autowms_app.js
+++ b/apps/autowms_app.js
@@ -62,12 +62,14 @@ var autowms_app = function (element, webmapjs) {
};
var createLayer = function (data, wmsServiceURL) {
+ console.log("WMS",wmsServiceURL)
// if(data.name == "baselayer" || data.name == "overlay")return "";
var previewURL =
wmsServiceURL +
"&service=WMS&request=getmap&format=image/png&layers=" +
data.name +
"&width=400&CRS=EPSG:4326&STYLES=&EXCEPTIONS=INIMAGE&showlegend=true&" +
+ //"&width=400&CRS=EPSG:4326&STYLES=&EXCEPTIONS=INIMAGE&showlegend=true&dim_reference_time=*&" +
Math.random();
var html =
" {
@@ -244,7 +249,7 @@ var autowms_app = function (element, webmapjs) {
path = "";
}
let customInput = $(".autowms_app_request_input").first().val();
-
+
if (customInput && customInput.length > 0) {
requestURL = customInput.trim().split("?")[0];
if (!requestURL.endsWith("?")) {
@@ -263,18 +268,20 @@ var autowms_app = function (element, webmapjs) {
prevPath.push(path);
}
var html = createReturnLink(data, path);
- element.html("... working ... ");
+ element.html("... working ... ");
+
data.result.sort((a, b) => {
- if (a.leaf === b.leaf) return 0;
- if (a.leaf === true) return 1;
- if (b.leaf === true) return -1;
+ if (a.name <= b.name) return -1;
+ if (a.name > b.name) return 1;
+ if (a.name == b.name) return 0;
});
for (var j = 0; j < data.result.length; j++) {
- html += createFile(data.result[j]);
+ html += createFile(data.result[j]);
currentData[data.result[j].name] = data.result[j];
}
+
element.html(html);
$(".autowms_app_fileitem_return")
.attr("onclick", "")
@@ -363,6 +370,7 @@ var autowms_app = function (element, webmapjs) {
this.resize = function (w, h) {};
};
+
try {
WMJSExtApplications["AutoWMS"] = autowms_app;
} catch (e) {}
diff --git a/apps/gfiapp_d3c3.js b/apps/gfiapp_d3c3.js
index 82ba6fb..481ad4d 100644
--- a/apps/gfiapp_d3c3.js
+++ b/apps/gfiapp_d3c3.js
@@ -27,7 +27,7 @@ var gfiapp_d3c3 = function(element, webmapjs) {
link.click();
link.remove();
});
-
+
var chart = c3.generate({
bindto: graph.get(0),
data: {
@@ -80,6 +80,7 @@ var gfiapp_d3c3 = function(element, webmapjs) {
var parseADAGUCGFIToPlotData = function(gfidata, elementid) {
+ //console.log(gfidata);
var ndims = 1;
if (typeof(gfidata[0].dims) != 'string') {
ndims = gfidata[0].dims.length;
@@ -199,7 +200,13 @@ var gfiapp_d3c3 = function(element, webmapjs) {
var loadDataForURL = function(mURL, elementid) {
- //console.log(mURL);
+ console.log(mURL);
+ if (mURL.includes("time=")){
+ i=mURL.indexOf("time=");
+ mURL0=mURL.slice(0,i+5);
+ mURLF=mURL.slice(i+5, mURL.length);
+ mURL=mURL0+"/"+mURLF
+ }
mURL += "&JSONP=?";
$.ajax({
type: 'GET',
diff --git a/apps/gfiapp_eprofile.js b/apps/gfiapp_eprofile.js
index 229d43a..894230d 100644
--- a/apps/gfiapp_eprofile.js
+++ b/apps/gfiapp_eprofile.js
@@ -83,6 +83,7 @@ var gfiapp_eprofile = function(element, webmapjs) {
$("#info").html("Displaying dates "+webmapjs.dateToISO8601(new Date(newBBOX.left))+" till "+webmapjs.dateToISO8601(new Date(newBBOX.right)));
};
+ console.log(gfiWindows[0])
gfiWindows[0].getWebMapJS().addListener("onloadingcomplete",ondimchange_profile,true);
webmapjs.enableInlineGetFeatureInfo(false);
diff --git a/apps/hipatia_app.js b/apps/hipatia_app.js
new file mode 100644
index 0000000..a2bac5b
--- /dev/null
+++ b/apps/hipatia_app.js
@@ -0,0 +1,384 @@
+var hipatia_app = function (element, webmapjs) {
+ initWMJS();
+ element.addClass("autowms_app_container");
+
+ let requestURL = "https://geoservices.knmi.nl/autowms?";
+
+ try {
+ requestURL = autowmsURL;
+ serverURL = autowmsURL.replace("autowms","adaguc-server")
+ } catch (e) {
+ }
+
+ var _this = this;
+ var currentData = {};
+ var fold_list = []
+ var proj_list = []
+ var prevPath = [];
+
+ var enabled = false;
+
+ var errormessage = function (data) {
+ var html = createReturnLink();
+
+ element.html(html + JSON.stringify(data));
+ $(".autowms_app_fileitem_return")
+ .attr("onclick", "")
+ .click(function (t) {
+ prevPath = [];
+ makeFileListRequest("");
+ });
+ };
+
+ function scanDirs(directoryPath){
+ $.ajax({
+ url: './hipatia/project.ls',
+ type: 'GET',
+ dataType: 'text',
+ success: function (data) {
+ datalist=data.split("\n")
+ for (var j=0;j")){
+ nombre=line.substring(line.indexOf(">")+1,line.indexOf(""))
+ arr_lay.push(nombre)
+ }
+ }
+ },
+ error: function(xhr, status, error) {
+
+ },
+ cache: false
+ });
+ }
+
+ var createFile = function (folder) {
+ let name = folder;
+ return (
+ "🗃 " +
+ folder +
+ ""
+ );
+ };
+
+ var createLayer = function (data, wmsServiceURL) {
+ console.log("WMS",wmsServiceURL)
+ // if(data.name == "baselayer" || data.name == "overlay")return "";
+ var previewURL =
+ wmsServiceURL +
+ "&service=WMS&request=getmap&format=image/png&layers=" +
+ data.name +
+ "&width=400&CRS=EPSG:4326&STYLES=&EXCEPTIONS=INIMAGE&showlegend=true&" +
+ //"&width=400&CRS=EPSG:4326&STYLES=&EXCEPTIONS=INIMAGE&showlegend=true&dim_reference_time=*&" +
+ Math.random();
+ var html =
+ "Layer " +
+ data.text +
+ " - (" +
+ data.name +
+ ")";
+ html +=
+ "';
+ html += "";
+ return html;
+ };
+
+ var createReturnLink = function (path) {
+ //console.log("PATH Create Link",path)
+ var html = "";
+ html +="" +
+ "Project: " +
+ "" +
+ ' '+
+ ''
+ for(var j=0; j'+proj_list[j] +''
+ html += ''+proj_list[j] +''
+ }
+ html +=''
+
+ html += ''
+ //html +=" ->" +
+ html +="";
+ // html+="Current folder: /"+prevPath[prevPath.length-1]+"";
+ html += " Current Data: ./"
+ if (!path || path=="" || path === "undefined" ){
+ path=hipatiaURL
+ }
+ html += path +
+ "";
+ html +=
+ '📁 ../ (⇧)↻ Refresh';
+ return html;
+ };
+
+ var init = function () {
+ element.html("
",$(".relativecontrol .ui-slider-handle").html(a)):$(".ui-slider-handle .relativecontrol").html("")},RelativeSlider=function(a){var b=this,c=a.renderTo;$(' ').appendTo(c);var d=0,e=function(h){d+=h;NaNd&&(d=0);isDefined(a.change)&&a.change(b,d)},
-f=c.find(".relativeslider").slider({min:0,max:100,value:50,animate:1E3,change:function(h,k){h.originalEvent&&(h=parseInt(k.value-50),e(h),50!=k.value&&f.slider("value",50))},slide:function(h,k){k=parseInt(k.value-50);h=d;k=d+k;void 0k&&(k=0);isDefined(a.slide)&&a.slide(b,k);d=h}});f.addClass("relativecontrol");c.find(".timeprevious").iconbutton({text:!1,icons:{primary:"ui-icon-circle-triangle-w"}});c.find(".timenext").iconbutton({text:!1,icons:{primary:"ui-icon-circle-triangle-e"}});
-c.find(".timeprevious").click(function(){e(-1)});c.find(".timenext").click(function(){e(1)});var g=c.find(".datetimepicker").datetimepicker({dateFormat:"yy-mm-dd",timeFormat:"HH:mm:ss",separator:"T",showOn:"button",buttonText:"",altFieldTimeOnly:!1,showAnim:"slideDown",changeMonth:!0,changeYear:!0,showTimezone:!1,onSelect:function(h,k){k=b.setPositionByText(h);h!=k.dimvalue&&g.datetimepicker("setDate",k.dimvalue.replace("Z",""))},css:{zIndex:4E3}});this.setPosition=function(h){d=h};this.setPositionByText=
-function(h){if(isDefined(a.textUpdate))return a.textUpdate(b,h)};this.setText=function(h,k){h=h.replace("Z","");c.find(".datetimepicker").val(h)};this.setMax=function(h,k,n){g.datetimepicker("option",{minDate:k.replace("Z",""),maxDate:n.replace("Z","")})}},TimeSlider=function(a){var b,c;this.setDimension=function(d,e,f){b=d;isDefined(void 0)&&(void 0).setMax(d.size(),d.getValueForIndex(0),d.getValueForIndex(d.size()-1));c="";this.setValue(d.name,d.getValue())};this.setValue=function(d,e){if(isDefined(b)&&
+Array.prototype.filter||(Array.prototype.filter=function(a){if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!==typeof a)throw new TypeError;for(var d=[],e=2<=arguments.length?arguments[1]:void 0,f=0;fInvalid JSON returned from server:"+l.responseText})});c&&k.init(1E3,m)};m()}else{f="";try{f=dump(e.ExceptionReport.Exception.attr),a.failure({message:"Process was not accepted, ExceptionReport:\n"+f})}catch(l){e.error?(e.message||(e.message=e.error),a.failure(e)):(f=dump(e),a.failure({message:"Process was not accepted (dump):\n"+f}))}}};
+this.execute=function(e,f){c=!0;e=b+"service=WPS&request=execute&identifier="+e+"&version=1.0.0&storeExecuteResponse=true&status=true&";e+="datainputs=";var g="",k;for(k in f)if("object"===typeof f[k])for(var h in f[k])0',{}),k=$('',{}),h=$('',{});
+a=$('',{});c=$('
"+layerPanel.WMJSLayer.lastError)}):h.hide():h.hide()}})}},
-l=Ext.create("Ext.form.field.Text",{itemId:"customwmsurltextarea",emptyText:I18n.enter_wms_version_url.text,height:25,margin:10,stateful:!0,listeners:{specialkey:function(m,u){u.getKey()==u.ENTER&&p(f)},afterrender:function(m){if(m=Ext.state.Manager.get("formFieldValues"))console.log(m),l.setValue(m)}}});var h=Ext.create("Ext.window.Window",{title:I18n.add_custom_service.text,width:620,height:200,autoDestroy:!0,autoScroll:!1,modal:!0,layout:"border",items:[{xtype:"panel",region:"north",layout:"fit",
-border:!1,itemId:"AddCustomWMSPanel",items:[l]},{xtype:"label",margin:10,html:"Add your own WMS version 1.1.1 server address in the box above. For example: https://geoservices.knmi.nl/cgi-bin/RADNL_OPER_R___25PCPRR_L3.cgi? ",region:"center"}],buttons:[{text:I18n.add.text,handler:function(){p(f)}}]});h.show()};a.showCustomWMSWindow=function(){c(a.dataPanelClicked,a.webMapJS)};Ext.apply(this,{title:I18n.add_layers_and_services.text,width:.8*$(window).width(),height:.8*$(window).height(),autoDestroy:!0,
-modal:!0,autoScroll:!0,id:"images-view",buttons:[{scale:"large",text:I18n.add_custom_wms_service.text,handler:function(){a.close();c(a.dataPanelClicked,a.webMapJS)}}],items:Ext.create("Ext.view.View",{store:b,tpl:';
"+layerPanel.WMJSLayer.lastError)}):
+G.hide():G.hide()}})}},P=Ext.create("Ext.form.field.Text",{itemId:"customwmsurltextarea",emptyText:I18n.enter_wms_version_url.text,height:25,margin:10,stateful:!0,listeners:{specialkey:function(T,R){R.getKey()==R.ENTER&&L(S)},afterrender:function(T){if(T=Ext.state.Manager.get("formFieldValues"))console.log(T),P.setValue(T)}}});var G=Ext.create("Ext.window.Window",{title:I18n.add_custom_service.text,width:620,height:200,autoDestroy:!0,autoScroll:!1,modal:!0,layout:"border",items:[{xtype:"panel",region:"north",
+layout:"fit",border:!1,itemId:"AddCustomWMSPanel",items:[P]},{xtype:"label",margin:10,html:"Add your own WMS version 1.1.1 server address in the box above. For example: https://geoservices.knmi.nl/cgi-bin/RADNL_OPER_R___25PCPRR_L3.cgi? ",region:"center"}],buttons:[{text:I18n.add.text,handler:function(){L(S)}}]});G.show()};c.showCustomWMSWindow=function(){y(c.dataPanelClicked,c.webMapJS)};Ext.apply(this,{title:I18n.add_layers_and_services.text,width:.8*$(window).width(),height:.8*$(window).height(),
+autoDestroy:!0,modal:!0,autoScroll:!0,id:"images-view",buttons:[{scale:"large",text:"BACK",handler:function(){c.close();Ext.create("webmapjsext.WMJSExt.FolderPanel",{dataPanelClicked:n,webMapJS:mainWebmapJS.webMapJS}).show()}},{scale:"large",text:I18n.add_custom_wms_service.text,handler:function(){c.close();y(c.dataPanelClicked,c.webMapJS)}},{scale:"large",text:"CLOSE",handler:function(){c.close()}}],items:Ext.create("Ext.view.View",{store:x,tpl:';
");var k=$("#"+g).find(".chart");g=$("#"+g).find(".controls");k.html("graph");g.button({label:"Export to CSV"}).click(function(){console.log("Export to CSV");for(var v="",t=q.datatoplot,n=0;ng?1:q');var k=b.getLayers();if(isDefined(k)){g="timeseries graph for location ["+Math.round(100*g.x)/100+","+Math.round(100*g.y)/100+"] ";$("#chart").empty();for(var v=0;v");$("#chart"+v).html('');l(n,"chart"+v)}$("#info").html(g)}else $("#info").html("No valid data received: "+data)}};b.addListener("mouseclicked",u,!0);this.enable=function(){a.html('');$("#info").html("Click on the map to create a timeseries graph.");
-console.log("init");b.enableInlineGetFeatureInfo(!1);h=!0};this.disable=function(){h=!1;b.enableInlineGetFeatureInfo(!0);m.set=!1};this.resize=function(q,g){console.log("w="+q);$("#chart").width(q);m.set&&u(m)};this.enable()};try{WMJSExtApplications["Time series mode"]=gfiapp_d3c3}catch(a){};var gfiapp_point_interest=function(a,b){var c=this,e=[],f=!0,p=function(l,h){var m=null,u=null,q=null;setflags=function(){m&&u&&q?(lon=m,lat=u,name=q,fullUrl=knmiFlagURL+"file="+pointInterestFileName+"&location="+lon+","+lat+"&name="+name,$.ajax({type:"GET",url:fullUrl,success:function(k){"OK"===k.status?(k=Ext.getCmp("webmapjs_add_point_interest"),k.getEl().dom.style.background="#BCED91",b.getImageStore().clear(),b.draw("draw")):(k=Ext.getCmp("webmapjs_add_point_interest"),k.getEl().dom.style.background=
-"#FF4040")},dataType:"jsonp",contentType:"application/jsonp",jsonpCallback:"resultSetFlag",crossDomain:!0})):(q||$("#webmapjs_point_interest_name").css("border","2px solid red"),m||$("#webmapjs_point_interest_lon").css("border","2px solid red"),u||$("#webmapjs_point_interest_lat").css("border","2px solid red"))};delete_flag=function(){Ext.MessageBox.show({title:I18n.delete_title_confirm.text,msg:I18n.are_you_sure.text,buttons:Ext.MessageBox.YESNO,icon:Ext.MessageBox.WARNING,fn:function(k){"yes"==
-k&&(name=$(".webmapjs_label_selected_point_interest").text(),fullUrl=knmiFlagURL+"file="+pointInterestFileName+"&name="+name,$.ajax({type:"GET",url:fullUrl,success:function(v){Ext.getCmp("webmapjs_delete_point_interest").getEl().dom.style.background="#BCED91";b.getImageStore().clear();b.draw()},dataType:"jsonp",contentType:"application/jsonp",jsonpCallback:"resultSetFlag",crossDomain:!0}))}})};a.html("