diff --git a/CHANGELOG b/CHANGELOG
index 07e920df9..b18ec0c81 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -87,11 +87,34 @@
- Se soluciona problemas con cambio de proyección.
- Se soluciona problema con el almacenado de altitud en el plugin infocoordinates.
- Se soluciona la visualización de objetos geográficos de tipo "GeometryCollection".
-- Se implementa multilenguaje en los plugins mapheader, mapfooter, maxextzoom, magnify y filteredsearch.
+- Se implementa multilenguaje en los plugins mapheader, mapfooter, maxextzoom, magnify, filteredsearch y wfstcontrols.
- Se implementa el método getHelp en los plugins filteredsearch, magnify, mapheader, mapfooter, maxextzoom y wfstcontrols.
- Se soluciona problema al usar estilo categórico con un estilo genérico e icono sin tener el proxy activado.
- Se soluciona problema con capas geojson con source GeometryCollection.
- Se genera en legacy el versionado de 1.0.0 y se modifica la versión del proyecto a la 1.1.0.
+- Se soluciona problema al activar resoluciones automáticas y cargar capa wms sin zoom.
+- Se adaptan los plugins para que muestre el título del índice en minúscula y el del contenido de la ayuda en mayúsculas.
+- Se soluciona problema con parámetro listeners en popup.
+- Se implementa la funcionalidad de listar los plugins de Community Plugins al llamar al servicio https://componentes.idee.es/api-idee/api/actions/resourcesPlugins.
+- Se elimina librería jackson y jersey-json por desuso y se aumenta la versión de log4j.
+- Se soluciona problemas con el control rotate en Cesium.
+- Se aumenta tamaño disponible para mostrar información en attributions.
+- Se resuelve problema con carga de capas WMS con proyección 4230 en el capabilities.
+- Se resuelven vulnerabilidades críticas en las librerías en el proyecto.
+- Se soluciona problema con estilo categoría y toImage.
+- Se soluciona problema con borde blanco del plugin Overviewmap.
+- Se soluciona problema con las capas WMS en versión 1.1.0 y el sistema de referencia.
+- Se soluciona problema con la actualización del valor de IDEE.useproxy.
+- Se incorpora en Cesium el estilo cluster.
+- Se implementa la posibilidad de añadir patrones en estilos en implementación Cesium.
+- Se mejora rendimiento de compilación.
+- Se implementa la posibilidad de añadir iconos con formato GLB/GLTF en Cesium.
+- Se soluciona problemas con coropletas y rango de colores.
+- Se elimina la librería ticket así como sus dependencias y se adapta el proxy para que no la use.
+- Se elimina librería commons-fileupload al no usarse.
+- Se actualizan las librerías log4j y postgresql.
+- Se fija la versión de la librería jackson-mapper-asl.
+- Se eliminan ficheros innecesarios de configuración de log.
- Se pueden importar archivos .tif, .tiff y .gpkg y se implementa mejora a la hora de añadir archivos pesados en el plugin LayerSwitcher.
- Se crean métodos en Utils para la transformación de formato GeoJSON y WKT a WKB, tanto a nivel de feature como de capa.
- La información recibida de un servicio en formato GeoJSON o KML se proyecta en la proyección estándar de estos formatos, EPSG:4326.
@@ -104,8 +127,8 @@
- Se cambia la estructura del archivo GeoJSON que toma como entrada el parámetro 'precharged' de LayerSwitcher.
- Se reconoce el parámetro 'type' del servicio cargado en LayerSwitcher.
- Permite la creación de grupos anidados de capas en LayerSwitcher.
-- Se sube la versión de OpenLayers de la 10.4 a la 10.7.
- Se implementa funcionalidad de resoluciones automáticas y configuración para activar dicha funcionalidad.
+- Se sube la versión de OpenLayers de la 10.4 a la 10.7.
01/01/25 - Versión 1.0.0
- Se incluye implementación 3D con Cesium
diff --git a/api-idee-database/pom.xml b/api-idee-database/pom.xml
index a638f58b9..4a5f4cd43 100644
--- a/api-idee-database/pom.xml
+++ b/api-idee-database/pom.xml
@@ -36,6 +36,7 @@
true
**/*.properties
+ **/*.xml
@@ -97,11 +98,18 @@
hibernate-spatial
5.6.1.Final
-
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-api
+
+
+ org.apache.logging.log4j
+ log4j-core
+
+
+ org.apache.logging.log4j
+ log4j-slf4j-impl
commons-codec
diff --git a/api-idee-database/src/main/resources/properties/log4j.properties b/api-idee-database/src/main/resources/properties/log4j.properties
deleted file mode 100644
index 393e0877e..000000000
--- a/api-idee-database/src/main/resources/properties/log4j.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-# Root logger option
-log4j.rootLogger=INFO, stdout
-
-# Direct log messages to stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
\ No newline at end of file
diff --git a/api-idee-database/src/main/resources/properties/log4j2.xml b/api-idee-database/src/main/resources/properties/log4j2.xml
new file mode 100644
index 000000000..22bf8c71f
--- /dev/null
+++ b/api-idee-database/src/main/resources/properties/log4j2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/api-idee-database/src/test/resources/log4j.xml b/api-idee-database/src/test/resources/log4j.xml
deleted file mode 100644
index ea5d70d57..000000000
--- a/api-idee-database/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/api-idee-database/src/test/resources/log4j2.xml b/api-idee-database/src/test/resources/log4j2.xml
new file mode 100644
index 000000000..b469ae65d
--- /dev/null
+++ b/api-idee-database/src/test/resources/log4j2.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/api-idee-database/src/test/resources/properties/log4j.properties b/api-idee-database/src/test/resources/properties/log4j.properties
deleted file mode 100644
index 393e0877e..000000000
--- a/api-idee-database/src/test/resources/properties/log4j.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-# Root logger option
-log4j.rootLogger=INFO, stdout
-
-# Direct log messages to stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
\ No newline at end of file
diff --git a/api-idee-js/src/facade/assets/css/controls/attributions.css b/api-idee-js/src/facade/assets/css/controls/attributions.css
index 30405599b..0a73bf130 100644
--- a/api-idee-js/src/facade/assets/css/controls/attributions.css
+++ b/api-idee-js/src/facade/assets/css/controls/attributions.css
@@ -27,7 +27,7 @@
text-decoration: none;
margin: 0;
padding: 0;
- max-width: 260px;
+ max-width: 500px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
diff --git a/api-idee-js/src/facade/assets/css/controls/rotate.css b/api-idee-js/src/facade/assets/css/controls/rotate.css
index 7b2dd5e8f..1a531bf3e 100644
--- a/api-idee-js/src/facade/assets/css/controls/rotate.css
+++ b/api-idee-js/src/facade/assets/css/controls/rotate.css
@@ -10,6 +10,21 @@
background-color: var(--idee-color-links) !important;
}
+.m-areas > div.m-area > div.m-panel.opened.m-rotate {
+ background-color: transparent !important;
+ box-shadow: none !important;
+ border: none !important;
+}
+
+.m-rotate-compass {
+ position: relative;
+ width: 150px;
+ height: 150px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
.m-rotate-slider {
border-radius: 50%;
cursor: pointer;
@@ -49,11 +64,36 @@ div.m-control.m-rotate-container {
fill: var(--idee-color-primary);
}
+.m-rotate-background-exterior,
+.m-rotate-svgPath-svg {
+ position: absolute;
+ width: 99px;
+ height: 99px;
+}
+
+.m-rotate-svgPath-svg {
+ width: 100px;
+}
+
+.m-rotate-exterior-svg {
+ position: absolute;
+ width: 120px;
+ height: 120px;
+ overflow: hidden;
+}
+
.m-rotate-exterior-svg.g-cartografia-exterior-1:before {
color: #fff;
font-size: 100px;
}
+.m-rotate-giroscopio-svg {
+ position: absolute;
+ width: 40px;
+ height: 40px;
+ box-sizing: content-box;
+}
+
.m-rotate-giroscopio-svg.g-cartografia-giroscopio:before {
font-size: 40px;
background-color: white;
diff --git a/api-idee-js/src/facade/assets/css/dialog.css b/api-idee-js/src/facade/assets/css/dialog.css
index d473d0209..1f2620cbd 100644
--- a/api-idee-js/src/facade/assets/css/dialog.css
+++ b/api-idee-js/src/facade/assets/css/dialog.css
@@ -63,6 +63,10 @@
padding: .5rem;
}
+.m-dialog div.m-message > :first-child {
+ width: 100%;
+}
+
/**************************
BUTTON
/**************************/
diff --git a/api-idee-js/src/facade/js/Popup.js b/api-idee-js/src/facade/js/Popup.js
index be06fbd15..cbeda7fae 100644
--- a/api-idee-js/src/facade/js/Popup.js
+++ b/api-idee-js/src/facade/js/Popup.js
@@ -240,6 +240,7 @@ class Popup extends Base {
if (IDEE.config.MOVE_MAP_EXTRACT) {
this.getImpl().setAnimationView();
}
+ this.update();
this.fire(EventType.POPUP_ADDED, [this]);
map.fire(EventType.POPUP_ADDED, [this]);
}
diff --git a/api-idee-js/src/facade/js/control/Rotate.js b/api-idee-js/src/facade/js/control/Rotate.js
index 898a2e1ea..8179298ac 100644
--- a/api-idee-js/src/facade/js/control/Rotate.js
+++ b/api-idee-js/src/facade/js/control/Rotate.js
@@ -259,17 +259,19 @@ class Rotate extends Control {
});
}
- const transform = 'transform';
- compTemplate.querySelector('#m-rotate-marker').style.WebkitTransform = 'rotate(45deg)';
- compTemplate.querySelector('#m-rotate-marker').style.MozTransform = 'rotate(45deg)';
- compTemplate.querySelector('#m-rotate-marker').style[transform] = 'rotate(45deg)';
- onMouseDown(this, compTemplate);
- onMouseMove(this, compTemplate, map);
- onMouseUp(this, compTemplate);
- onClick(this, compTemplate, map);
- this.on(EventType.ADDED_TO_MAP, () => {
- this.getImpl().onChangeView(compTemplate);
- });
+ if (this.map.getImplementation() !== 'cesium') {
+ const transform = 'transform';
+ compTemplate.querySelector('#m-rotate-marker').style.WebkitTransform = 'rotate(45deg)';
+ compTemplate.querySelector('#m-rotate-marker').style.MozTransform = 'rotate(45deg)';
+ compTemplate.querySelector('#m-rotate-marker').style[transform] = 'rotate(45deg)';
+ onMouseDown(this, compTemplate);
+ onMouseMove(this, compTemplate, map);
+ onMouseUp(this, compTemplate);
+ onClick(this, compTemplate, map);
+ this.on(EventType.ADDED_TO_MAP, () => {
+ this.getImpl().onChangeView(compTemplate);
+ });
+ }
return compTemplate;
}
diff --git a/api-idee-js/src/facade/js/util/Response.js b/api-idee-js/src/facade/js/util/Response.js
index 8410a1ef9..4666864ae 100644
--- a/api-idee-js/src/facade/js/util/Response.js
+++ b/api-idee-js/src/facade/js/util/Response.js
@@ -97,7 +97,7 @@ class Response {
try {
// it uses DOMParser for html responses
// google XML parser in other case
- const contentType = proxyResponse.headers['Content-Type'];
+ const contentType = proxyResponse.headers['Content-Type'] || proxyResponse.headers['CONTENT-TYPE'] || proxyResponse.headers['content-type'];
if ((typeof DOMParser !== 'undefined') && /text\/html/i.test(contentType)) {
this.xml = (new DOMParser()).parseFromString(this.text, 'text/html');
} else if (/xml/i.test(contentType)) { // it avoids responses that aren't xml format
diff --git a/api-idee-js/src/impl/cesium/js/util/WMSCapabilities.js b/api-idee-js/src/impl/cesium/js/util/WMSCapabilities.js
index e63a3fa44..0956c0813 100644
--- a/api-idee-js/src/impl/cesium/js/util/WMSCapabilities.js
+++ b/api-idee-js/src/impl/cesium/js/util/WMSCapabilities.js
@@ -135,7 +135,9 @@ class GetCapabilities {
}
} else if (isObject(layer)) {
// base case
- if (isNullOrEmpty(layerName) || (layer.Name === layerName)) {
+ if (isNullOrEmpty(layerName) || (layer.Name === layerName)
+ || (isString(layer.Name) && isString(layerName)
+ && layer.Name.toLowerCase() === layerName.toLowerCase())) {
if (!isNullOrEmpty(layer.BoundingBox)) {
const bboxSameProj = layer.BoundingBox
.find((bbox) => bbox.crs === this.projection_.code);
diff --git a/api-idee-js/src/impl/ol/js/Map.js b/api-idee-js/src/impl/ol/js/Map.js
index b646fca10..13c8b02bc 100644
--- a/api-idee-js/src/impl/ol/js/Map.js
+++ b/api-idee-js/src/impl/ol/js/Map.js
@@ -3152,7 +3152,7 @@ class Map extends MObject {
// calculates the new resolution
let newResolution;
// eslint-disable-next-line no-underscore-dangle
- const facadeUserZoom = this.facadeMap_._userZoom;
+ const facadeUserZoom = this.facadeMap_._userZoom || IDEE.config.DEFAULT_ZOOM;
const userAskedZoom = !isNullOrEmpty(facadeUserZoom);
const useZoomIndex = isNullOrEmpty(this.userBbox_) || userAskedZoom;
if (!isNullOrEmpty(resolutions) && useZoomIndex) {
diff --git a/api-idee-js/src/impl/ol/js/layer/WMTS.js b/api-idee-js/src/impl/ol/js/layer/WMTS.js
index c019b1978..87e20139b 100644
--- a/api-idee-js/src/impl/ol/js/layer/WMTS.js
+++ b/api-idee-js/src/impl/ol/js/layer/WMTS.js
@@ -257,7 +257,7 @@ class WMTS extends LayerBase {
setVisible(visibility) {
this.visibility = visibility;
// if this layer is base then it hides all base layers
- if ((visibility === true) && (this.isBase === true)) {
+ if ((visibility === true) && (this.isBase !== false) && !this.isVisible()) {
// hides all base layers
this.map.getBaseLayers()
.filter((layer) => !layer.equals(this.facadeLayer_) && layer.isVisible())
@@ -268,18 +268,11 @@ class WMTS extends LayerBase {
this.olLayer.setVisible(visibility);
}
- // updates resolutions and keep the zoom (priorizar bbox guardado en el mapa)
- let oldBbox = this.map.getBbox();
- // eslint-disable-next-line no-underscore-dangle
- if (!isNullOrEmpty(this.map.getImpl().userBbox_)) {
- // eslint-disable-next-line no-underscore-dangle
- oldBbox = this.map.getImpl().userBbox_;
- }
- if (!isNullOrEmpty(oldBbox)) {
- const extent = isArray(oldBbox)
- ? oldBbox
- : [oldBbox.x.min, oldBbox.y.min, oldBbox.x.max, oldBbox.y.max];
- this.map.setBbox(extent, { nearest: true });
+ // updates resolutions and keep the zoom
+ const oldZoom = this.map.getZoom();
+ // this.map.getImpl().updateResolutionsFromBaseLayer();
+ if (!isNullOrEmpty(oldZoom)) {
+ this.map.setZoom(oldZoom);
}
} else if (!isNullOrEmpty(this.olLayer)) {
this.olLayer.setVisible(visibility);
diff --git a/api-idee-js/src/impl/ol/js/util/WMSCapabilities.js b/api-idee-js/src/impl/ol/js/util/WMSCapabilities.js
index 59e083bf6..f0146392b 100644
--- a/api-idee-js/src/impl/ol/js/util/WMSCapabilities.js
+++ b/api-idee-js/src/impl/ol/js/util/WMSCapabilities.js
@@ -141,7 +141,9 @@ class GetCapabilities {
}
} else if (isObject(layer)) {
// base case
- if (isNullOrEmpty(layerName) || (layer.Name === layerName)) {
+ if (isNullOrEmpty(layerName) || (layer.Name === layerName)
+ || (isString(layer.Name) && isString(layerName)
+ && layer.Name.toLowerCase() === layerName.toLowerCase())) {
const projection = tgtProjection || this.projection_.code;
if (!isNullOrEmpty(layer.BoundingBox)) {
const bboxSameProj = layer.BoundingBox.find((bbox) => bbox.crs === projection);
@@ -191,7 +193,12 @@ class GetCapabilities {
* @private
*/
isReversedAxisOrder_(crsCode, proj) {
- if (this.capabilities_.version !== '1.3.0' || !proj) {
+ if (this.capabilities_.version !== '1.3.0' || !proj || isNullOrEmpty(crsCode)) {
+ return false;
+ }
+ const crs = crsCode.toUpperCase();
+ // CRS:84 usa orden lon/lat (e/n); no aplicar intercambio de ejes WMS 1.3.0
+ if (crs === 'CRS:84' || crs === 'OGC:1.3:CRS84' || crs.includes('CRS84')) {
return false;
}
const axisOrientation = proj.getAxisOrientation();
@@ -295,6 +302,10 @@ class GetCapabilities {
}
if (this.capabilities_.version === '1.3.0' && isString(this.capabilitiesProj)) {
+ const crs = this.capabilitiesProj.toUpperCase();
+ if (crs === 'CRS:84' || crs === 'OGC:1.3:CRS84' || crs.includes('CRS84')) {
+ return result;
+ }
const proj = getProjection(this.capabilitiesProj);
if (proj && Array.isArray(result)) {
const axisOrientation = proj.getAxisOrientation();
diff --git a/api-idee-js/src/plugins/comparators/src/facade/js/mirrorpanelcontrol.js b/api-idee-js/src/plugins/comparators/src/facade/js/mirrorpanelcontrol.js
index 85aad8794..80756c029 100644
--- a/api-idee-js/src/plugins/comparators/src/facade/js/mirrorpanelcontrol.js
+++ b/api-idee-js/src/plugins/comparators/src/facade/js/mirrorpanelcontrol.js
@@ -664,14 +664,17 @@ export default class MirrorpanelControl extends IDEE.Control {
// ? No es "ninguna capa" muestra la capa.
if (value !== 'void') {
- const someSaveLayers = this.comparatorsControls.saveLayers.find((l) => value.includes(`*${l}*`));
- const layerFind = this.mapL[map].getLayers().find((l) => l.name === someSaveLayers);
+ const layerName = getNameString(value);
+ const layerFind = this.mapL[map].getLayers().find((l) => l.name === layerName);
if (layerFind) {
layerFind.setVisible(true);
} else {
this.mapL[map].addLayers(value);
}
+ if (layerName && !this.comparatorsControls.saveLayers.includes(layerName)) {
+ this.comparatorsControls.saveLayers.push(layerName);
+ }
this.layerSelected[map] = value;
}
}
diff --git a/api-idee-js/src/plugins/filteredsearch/src/facade/js/filteredsearch.js b/api-idee-js/src/plugins/filteredsearch/src/facade/js/filteredsearch.js
index 5dd1e458c..5ef64dbde 100644
--- a/api-idee-js/src/plugins/filteredsearch/src/facade/js/filteredsearch.js
+++ b/api-idee-js/src/plugins/filteredsearch/src/facade/js/filteredsearch.js
@@ -141,7 +141,7 @@ export default class FilteredSearch extends IDEE.Plugin {
*/
getHelp() {
return {
- title: getValue('textHelp.title'),
+ title: getValue('textHelp.squemaTitle'),
content: new Promise((resolve) => {
const html = IDEE.template.compileSync(myhelp, {
vars: {
diff --git a/api-idee-js/src/plugins/filteredsearch/src/facade/js/i18n/en.json b/api-idee-js/src/plugins/filteredsearch/src/facade/js/i18n/en.json
index f2e185aa3..9a6c0a0f6 100644
--- a/api-idee-js/src/plugins/filteredsearch/src/facade/js/i18n/en.json
+++ b/api-idee-js/src/plugins/filteredsearch/src/facade/js/i18n/en.json
@@ -41,6 +41,7 @@
"no_saved_queries": "No saved queries.",
"no_entities": "No entities with the specified characteristics.",
"textHelp": {
+ "squemaTitle": "filteredsearch",
"title": "FILTEREDSEARCH",
"paragraph1": "This plugin lets you build attribute queries on queryable map layers, combine operators and values, apply the selection on the map, and manage saved queries.",
"screenshot1Alt": "Map with the filter manager button (funnel icon) visible on the cartography",
diff --git a/api-idee-js/src/plugins/filteredsearch/src/facade/js/i18n/es.json b/api-idee-js/src/plugins/filteredsearch/src/facade/js/i18n/es.json
index 8275716eb..b18724855 100644
--- a/api-idee-js/src/plugins/filteredsearch/src/facade/js/i18n/es.json
+++ b/api-idee-js/src/plugins/filteredsearch/src/facade/js/i18n/es.json
@@ -41,6 +41,7 @@
"no_saved_queries": "No hay consultas guardadas.",
"no_entities": "No hay entidades con las caracerísticas indicadas.",
"textHelp": {
+ "squemaTitle": "filteredsearch",
"title": "FILTEREDSEARCH",
"paragraph1": "Este plugin permite construir consultas por atributos sobre capas del mapa que admitan consulta, combinar operadores y valores, aplicar la selección al mapa y gestionar consultas guardadas.",
"screenshot1Alt": "Icono del plugin filteredsearch en el mapa",
diff --git a/api-idee-js/src/plugins/layerswitcher/src/facade/js/layerswitchercontrol.js b/api-idee-js/src/plugins/layerswitcher/src/facade/js/layerswitchercontrol.js
index 0b1b5a15b..913c4c05c 100644
--- a/api-idee-js/src/plugins/layerswitcher/src/facade/js/layerswitchercontrol.js
+++ b/api-idee-js/src/plugins/layerswitcher/src/facade/js/layerswitchercontrol.js
@@ -319,8 +319,11 @@ export default class LayerswitcherControl extends IDEE.Control {
&& !IDEE.utils.isNullOrEmpty(layer.capabilitiesMetadata.abstract);
return new Promise((success) => {
- let hasStyles = (hasMetadata && layer.capabilitiesMetadata.style.length > 1)
- || (layer instanceof IDEE.layer.Vector && !IDEE.utils.isNullOrEmpty(layer.predefinedStyles)
+ let hasStyles = (hasMetadata
+ && layer.capabilitiesMetadata.style !== undefined
+ && layer.capabilitiesMetadata.style.length > 1)
+ || (layer instanceof IDEE.layer.Vector
+ && !IDEE.utils.isNullOrEmpty(layer.predefinedStyles)
&& layer.predefinedStyles.length > 1);
if (layer.type === 'KML') {
if (layer.options === null) {
@@ -1308,6 +1311,7 @@ export default class LayerswitcherControl extends IDEE.Control {
if (precharged && precharged.groups && !Array.isArray(precharged.groups[0].services)) {
precharged = this.normalizePrecharged(precharged);
+ this.precharged = precharged;
}
const hasPrecharged = (precharged.groups !== undefined && precharged.groups.length > 0)
@@ -2050,7 +2054,7 @@ export default class LayerswitcherControl extends IDEE.Control {
this.capabilities[j].options.origen = this.capabilities[j].type;
const legendUrl = this.capabilities[j].getLegendURL();
const meta = this.capabilities[j].capabilitiesMetadata;
- if ((legendUrl.indexOf('GetLegendGraphic') > -1 || legendUrl.indexOf(`${IDEE.config.STATIC_RESOURCES_URL}/imagenes/leyenda/legend-default.png`) > -1) && meta !== undefined && meta.style.length > 0) {
+ if ((legendUrl.indexOf('GetLegendGraphic') > -1 || legendUrl.indexOf(`${IDEE.config.STATIC_RESOURCES_URL}/imagenes/leyenda/legend-default.png`) > -1) && meta !== undefined && meta.style !== undefined && meta.style.length > 0) {
if (meta.style[0].LegendURL !== undefined && meta.style[0].LegendURL.length > 0) {
const style = meta.style[0].LegendURL[0].OnlineResource;
if (style !== undefined && style !== null) {
diff --git a/api-idee-js/src/plugins/magnify/src/facade/js/i18n/en.json b/api-idee-js/src/plugins/magnify/src/facade/js/i18n/en.json
index d73616f4e..71d0f5bdb 100644
--- a/api-idee-js/src/plugins/magnify/src/facade/js/i18n/en.json
+++ b/api-idee-js/src/plugins/magnify/src/facade/js/i18n/en.json
@@ -8,6 +8,7 @@
"actmagnifier": "Activate magnifier",
"zoomlevel": "Zoom level: ",
"textHelp": {
+ "squemaTitle": "magnify",
"title": "MAGNIFY",
"paragraph1": "The magnifier enlarges a circular area of the map over the background cartography (e.g. imagery or basemaps) while the rest of the view stays at normal scale for comparison.",
"screenshot1Alt": "Icon of the plugin magnify in the map",
diff --git a/api-idee-js/src/plugins/magnify/src/facade/js/i18n/es.json b/api-idee-js/src/plugins/magnify/src/facade/js/i18n/es.json
index 352fa692e..012d17749 100644
--- a/api-idee-js/src/plugins/magnify/src/facade/js/i18n/es.json
+++ b/api-idee-js/src/plugins/magnify/src/facade/js/i18n/es.json
@@ -8,6 +8,7 @@
"actmagnifier": "Activar lupa",
"zoomlevel": "Nivel de zoom: ",
"textHelp": {
+ "squemaTitle": "magnify",
"title": "MAGNIFY",
"paragraph1": "La lupa amplía una zona circular del mapa sobre la cartografía de fondo, manteniendo el resto del visor a escala normal para comparar el detalle.",
"screenshot1Alt": "Icono del plugin magnify en el mapa",
diff --git a/api-idee-js/src/plugins/magnify/src/facade/js/magnify.js b/api-idee-js/src/plugins/magnify/src/facade/js/magnify.js
index 8bc7144ad..49112729a 100644
--- a/api-idee-js/src/plugins/magnify/src/facade/js/magnify.js
+++ b/api-idee-js/src/plugins/magnify/src/facade/js/magnify.js
@@ -220,7 +220,7 @@ export default class Magnify extends IDEE.Plugin {
*/
getHelp() {
return {
- title: getValue('textHelp.title'),
+ title: getValue('textHelp.squemaTitle'),
content: new Promise((resolve) => {
const html = IDEE.template.compileSync(myhelp, {
vars: {
diff --git a/api-idee-js/src/plugins/mapfooter/src/facade/js/i18n/en.json b/api-idee-js/src/plugins/mapfooter/src/facade/js/i18n/en.json
index 167b74340..543eac110 100644
--- a/api-idee-js/src/plugins/mapfooter/src/facade/js/i18n/en.json
+++ b/api-idee-js/src/plugins/mapfooter/src/facade/js/i18n/en.json
@@ -7,6 +7,7 @@
"hide": " Hide ",
"show": " Show ",
"textHelp": {
+ "squemaTitle": "mapfooter",
"title": "MAPFOOTER",
"paragraph1": "The mapfooter plugin inserts an HTML footer below the viewer (default left bottom panel) with configurable content (htmlCode) and optional styles (cssList), typically for legal notices, links or credits.",
"screenshot1Alt": "Viewer with footer collapsed; the map uses the full lower height",
diff --git a/api-idee-js/src/plugins/mapfooter/src/facade/js/i18n/es.json b/api-idee-js/src/plugins/mapfooter/src/facade/js/i18n/es.json
index 6acd6f745..4aac73f25 100644
--- a/api-idee-js/src/plugins/mapfooter/src/facade/js/i18n/es.json
+++ b/api-idee-js/src/plugins/mapfooter/src/facade/js/i18n/es.json
@@ -7,6 +7,7 @@
"hide": " Ocultar ",
"show": " Mostrar ",
"textHelp": {
+ "squemaTitle": "mapfooter",
"title": "MAPFOOTER",
"paragraph1": "El plugin mapfooter inserta un pie HTML bajo el visor (panel inferior izquierdo por defecto) con contenido configurable (htmlCode) y hojas de estilo opcionales (cssList), habitual para avisos legales, enlaces o créditos.",
"screenshot1Alt": "Visor con el pie de página plegado; el mapa aprovecha la altura inferior",
diff --git a/api-idee-js/src/plugins/mapfooter/src/facade/js/mapfooter.js b/api-idee-js/src/plugins/mapfooter/src/facade/js/mapfooter.js
index 838d74e38..6d96afbd4 100644
--- a/api-idee-js/src/plugins/mapfooter/src/facade/js/mapfooter.js
+++ b/api-idee-js/src/plugins/mapfooter/src/facade/js/mapfooter.js
@@ -123,7 +123,7 @@ export default class Mapfooter extends IDEE.Plugin {
*/
getHelp() {
return {
- title: getValue('textHelp.title'),
+ title: getValue('textHelp.squemaTitle'),
content: new Promise((resolve) => {
const html = IDEE.template.compileSync(myhelp, {
vars: {
diff --git a/api-idee-js/src/plugins/mapheader/src/facade/js/i18n/en.json b/api-idee-js/src/plugins/mapheader/src/facade/js/i18n/en.json
index 7c2474675..dbb9b00a5 100644
--- a/api-idee-js/src/plugins/mapheader/src/facade/js/i18n/en.json
+++ b/api-idee-js/src/plugins/mapheader/src/facade/js/i18n/en.json
@@ -7,6 +7,7 @@
"hide": " Hide ",
"show": " Show ",
"textHelp": {
+ "squemaTitle": "mapheader",
"title": "MAPHEADER",
"paragraph1": "The mapheader plugin adds a top strip above the viewer with configurable HTML content: institutional logos, title, subtitles and links, typical of download portals or corporate maps.",
"screenshot1Alt": "Map without institutional header strip; standard viewer controls visible",
diff --git a/api-idee-js/src/plugins/mapheader/src/facade/js/i18n/es.json b/api-idee-js/src/plugins/mapheader/src/facade/js/i18n/es.json
index 5e247d763..16d398f47 100644
--- a/api-idee-js/src/plugins/mapheader/src/facade/js/i18n/es.json
+++ b/api-idee-js/src/plugins/mapheader/src/facade/js/i18n/es.json
@@ -7,6 +7,7 @@
"hide": " Ocultar ",
"show": " Mostrar ",
"textHelp": {
+ "squemaTitle": "mapheader",
"title": "MAPHEADER",
"paragraph1": "El plugin mapheader inserta una franja superior sobre el visor con contenido HTML configurable: logotipos institucionales, título, subtítulos y enlaces, habitual en portales de descargas o visores corporativos.",
"screenshot1Alt": "Mapa sin franja de cabecera institucional; controles estándar del visor visibles",
diff --git a/api-idee-js/src/plugins/mapheader/src/facade/js/mapheader.js b/api-idee-js/src/plugins/mapheader/src/facade/js/mapheader.js
index 6bafc0be9..6b6d1f7aa 100644
--- a/api-idee-js/src/plugins/mapheader/src/facade/js/mapheader.js
+++ b/api-idee-js/src/plugins/mapheader/src/facade/js/mapheader.js
@@ -118,7 +118,7 @@ export default class Mapheader extends IDEE.Plugin {
*/
getHelp() {
return {
- title: getValue('textHelp.title'),
+ title: getValue('textHelp.squemaTitle'),
content: new Promise((resolve) => {
const html = IDEE.template.compileSync(myhelp, {
vars: {
diff --git a/api-idee-js/src/plugins/maxextzoom/src/facade/js/i18n/en.json b/api-idee-js/src/plugins/maxextzoom/src/facade/js/i18n/en.json
index 2208ae880..6a02b8a65 100644
--- a/api-idee-js/src/plugins/maxextzoom/src/facade/js/i18n/en.json
+++ b/api-idee-js/src/plugins/maxextzoom/src/facade/js/i18n/en.json
@@ -5,6 +5,7 @@
"tooltip": "Zoom to the map extent",
"zoommapextend": "Zoom to the map extent",
"textHelp": {
+ "squemaTitle": "maxextzoom",
"title": "MAXEXTZOOM",
"paragraph1": "This plugin adds a button that fits the map view to the maximum extent defined by the viewer (loaded layers, WMC or default bounding box) in a single click.",
"screenshot1Alt": "Map with the zoom-to-extent control visible on the viewer toolbar",
diff --git a/api-idee-js/src/plugins/maxextzoom/src/facade/js/i18n/es.json b/api-idee-js/src/plugins/maxextzoom/src/facade/js/i18n/es.json
index 945f4af0c..94980dcb6 100644
--- a/api-idee-js/src/plugins/maxextzoom/src/facade/js/i18n/es.json
+++ b/api-idee-js/src/plugins/maxextzoom/src/facade/js/i18n/es.json
@@ -5,6 +5,7 @@
"tooltip": "Zoom a la extensión del mapa",
"zoommapextend": "Zoom a la extensión del mapa",
"textHelp": {
+ "squemaTitle": "maxextzoom",
"title": "MAXEXTZOOM",
"paragraph1": "Este plugin añade un botón que ajusta la vista del mapa a la extensión máxima definida por la configuración del visor (capas cargadas, WMC o caja por defecto), de un solo clic.",
"screenshot1Alt": "Mapa con el control de zoom a extensión visible en la barra del visor",
diff --git a/api-idee-js/src/plugins/maxextzoom/src/facade/js/maxextzoom.js b/api-idee-js/src/plugins/maxextzoom/src/facade/js/maxextzoom.js
index f61d929aa..e9a6fff54 100644
--- a/api-idee-js/src/plugins/maxextzoom/src/facade/js/maxextzoom.js
+++ b/api-idee-js/src/plugins/maxextzoom/src/facade/js/maxextzoom.js
@@ -135,7 +135,7 @@ export default class MaxExtZoom extends IDEE.Plugin {
*/
getHelp() {
return {
- title: getValue('textHelp.title'),
+ title: getValue('textHelp.squemaTitle'),
content: new Promise((resolve) => {
const html = IDEE.template.compileSync(myhelp, {
vars: {
diff --git a/api-idee-js/src/plugins/wfstcontrols/src/api.json b/api-idee-js/src/plugins/wfstcontrols/src/api.json
index 98f957067..a5472d3ba 100644
--- a/api-idee-js/src/plugins/wfstcontrols/src/api.json
+++ b/api-idee-js/src/plugins/wfstcontrols/src/api.json
@@ -7,6 +7,11 @@
"parameters": [{
"type": "object",
"properties": [{
+ "type": "simple",
+ "name": "position",
+ "possibleValues": ["TL", "TR", "BL", "BR"],
+ "value": "TL"
+ },{
"type": "simple",
"name": "features",
"value": "drawfeature,modifyfeature,deletefeature,editattribute"
diff --git a/api-idee-js/src/plugins/wfstcontrols/src/facade/assets/css/wfstcontrols.css b/api-idee-js/src/plugins/wfstcontrols/src/facade/assets/css/wfstcontrols.css
index b6a06e467..bf5f0f2a4 100644
--- a/api-idee-js/src/plugins/wfstcontrols/src/facade/assets/css/wfstcontrols.css
+++ b/api-idee-js/src/plugins/wfstcontrols/src/facade/assets/css/wfstcontrols.css
@@ -104,6 +104,15 @@
border: 2px solid red;
}
+.m-left .m-panel.m-edition.opened div.m-control button[class^=g-cartografia-],
+.m-left .m-panel.m-edition.opened div.m-control button[class*=" g-cartografia-"],
+.m-right .m-panel.m-edition.opened div.m-control button[class^=g-cartografia-],
+.m-right .m-panel.m-edition.opened div.m-control button[class*=" g-cartografia-"] {
+ color: #364b5f !important;
+ background-color: white !important;
+ opacity: 1;
+}
+
.m-areas>div.m-area>div.m-panel.m-edition>div.m-panel-controls>div.m-control.activated>button {
color: #67af13 !important;
}
\ No newline at end of file
diff --git a/api-idee-js/src/plugins/wfstcontrols/src/facade/js/i18n/en.json b/api-idee-js/src/plugins/wfstcontrols/src/facade/js/i18n/en.json
index 9b9dadf2d..90fc7f6e2 100644
--- a/api-idee-js/src/plugins/wfstcontrols/src/facade/js/i18n/en.json
+++ b/api-idee-js/src/plugins/wfstcontrols/src/facade/js/i18n/en.json
@@ -27,6 +27,7 @@
"save_element_successfully": "The element has been saved successfully",
"save_successfully": "The element has been saved successfully",
"textHelp": {
+ "squemaTitle": "wfstcontrols",
"title": "WFSTCONTROLS",
"paragraph1": "This plugin groups transactional editing actions on a WFS layer loaded in the map: draw, modify or delete features, edit attributes, clear local changes and save to the service (depending on configured controls). It requires a compatible WFS layer and, if needed, a geometry parameter or automatic geometry detection.",
"screenshot1Alt": "Icon of wfstcontrols in the map",
diff --git a/api-idee-js/src/plugins/wfstcontrols/src/facade/js/i18n/es.json b/api-idee-js/src/plugins/wfstcontrols/src/facade/js/i18n/es.json
index 9f318438e..8b970636b 100644
--- a/api-idee-js/src/plugins/wfstcontrols/src/facade/js/i18n/es.json
+++ b/api-idee-js/src/plugins/wfstcontrols/src/facade/js/i18n/es.json
@@ -27,6 +27,7 @@
"save_element_successfully": "Se ha guardado correctamente el elemento",
"save_successfully": "Se ha guardado correctamente",
"textHelp": {
+ "squemaTitle": "wfstcontrols",
"title": "WFSTCONTROLS",
"paragraph1": "Este plugin agrupa acciones de edición transaccional sobre una capa WFS cargada en el mapa: dibujar, modificar o eliminar geometrías, editar atributos, limpiar cambios locales y guardar en el servicio (según los controles configurados). Requiere capa WFS compatible y, si aplica, parámetro geometry o detección automática de tipo.",
"screenshot1Alt": "Icono de wfstcontrols en el mapa",
diff --git a/api-idee-js/src/plugins/wfstcontrols/src/facade/js/wfstcontrols.js b/api-idee-js/src/plugins/wfstcontrols/src/facade/js/wfstcontrols.js
index a2cba8c5b..6d8169504 100644
--- a/api-idee-js/src/plugins/wfstcontrols/src/facade/js/wfstcontrols.js
+++ b/api-idee-js/src/plugins/wfstcontrols/src/facade/js/wfstcontrols.js
@@ -34,6 +34,7 @@ export default class WFSTControls extends IDEE.Plugin {
let layernamefix;
let geometryfix;
const proxyfix = {};
+ let optionsPosition = 'TL';
// Parse new controls model to the old one
@@ -43,6 +44,9 @@ export default class WFSTControls extends IDEE.Plugin {
geometryfix = controls.geometry;
proxyfix.status = controls.proxy ? controls.proxy.status === true || controls.proxy.status === 'true' : true;
proxyfix.disable = controls.proxy ? controls.proxy.disable === true || controls.proxy.disable === 'true' : true;
+ if (controls.position) {
+ optionsPosition = controls.position;
+ }
} else {
layernamefix = layername;
controlsfix = controls;
@@ -51,6 +55,9 @@ export default class WFSTControls extends IDEE.Plugin {
proxyfix.disable = proxyDisable;
}
+ const positions = ['TR', 'TL', 'BL', 'BR'];
+ this.position_ = positions.includes(optionsPosition) ? optionsPosition : 'TL';
+
/**
* Array of controls to be added
* @private
@@ -240,12 +247,12 @@ export default class WFSTControls extends IDEE.Plugin {
collapsible: true,
className: 'm-edition',
collapsedButtonClass: 'g-cartografia-editar',
- position: IDEE.ui.position.TL,
+ position: IDEE.ui.position[this.position_],
tooltip: getValue('tooltip'),
});
if (IDEE.utils.isNullOrEmpty(wfslayer)) {
- IDEE.dialog.error(`${getValue('noWFSlayerloaded')}${this.controls.join(',')}${getValue('exception.noWFSlayerloaded1')}`);
+ IDEE.dialog.error(`${getValue('exception.noWFSlayerloaded')}${this.controls.join(',')}${getValue('exception.noWFSlayerloaded1')}`);
} else {
let addSave = false;
let addClear = false;
@@ -373,7 +380,7 @@ export default class WFSTControls extends IDEE.Plugin {
name: this.layername_,
})[0];
if (IDEE.utils.isNullOrEmpty(wfslayer)) {
- IDEE.dialog.error(`${getValue('noloadedWFSlayer')}${layername}${getValue('noloadedWFSlayer1')}.`);
+ IDEE.dialog.error(`${getValue('exception.noloadedWFSlayer')}${layername}${getValue('exception.noloadedWFSlayer1')}.`);
} else {
const objControls = [];
if (!IDEE.utils.isNullOrEmpty(this.drawfeature_)) objControls.push(this.drawfeature_);
@@ -467,7 +474,7 @@ export default class WFSTControls extends IDEE.Plugin {
*/
getHelp() {
return {
- title: getValue('textHelp.title'),
+ title: getValue('textHelp.squemaTitle'),
content: new Promise((resolve) => {
const html = IDEE.template.compileSync(myhelp, {
vars: {
diff --git a/api-idee-js/src/plugins/wfstcontrols/src/impl/ol/js/editattribute.js b/api-idee-js/src/plugins/wfstcontrols/src/impl/ol/js/editattribute.js
index c93523c67..596b43b0f 100644
--- a/api-idee-js/src/plugins/wfstcontrols/src/impl/ol/js/editattribute.js
+++ b/api-idee-js/src/plugins/wfstcontrols/src/impl/ol/js/editattribute.js
@@ -68,59 +68,70 @@ export default class EditAttribute extends IDEE.impl.Control {
* @param {array} coordinate - Coordinated to show popup
*/
showEditPopup_(features, evt) {
- this.unselectFeature_();
- this.editFeature = features[0].getImpl().getOLFeature();
- const coordinate = evt.coord;
+ if (features.length !== 0) {
+ this.unselectFeature_();
+ this.editFeature = features[0].getImpl().getOLFeature();
+ const coordinate = evt.coord;
- // avoid editing new features
- if (IDEE.utils.isNullOrEmpty(this.editFeature.getId())) {
- this.editFeature = null;
- IDEE.dialog.info(getValue('save_element_before'));
- } else {
- this.editFeature.setStyle(EditAttribute.SELECTED_STYLE);
+ // avoid editing new features
+ if (IDEE.utils.isNullOrEmpty(this.editFeature.getId())) {
+ this.editFeature = null;
+ IDEE.dialog.info(getValue('exception.save_element_before'));
+ } else {
+ this.editFeature.setStyle(EditAttribute.SELECTED_STYLE);
- const templateVar = {
- properties: [],
- };
- Object.keys(this.editFeature.getProperties()).filter((propName) => {
- return (propName !== 'geometry');
- }).forEach((propName) => {
- templateVar.properties.push({
- key: propName,
- value: this.editFeature.get(propName),
+ const templateVar = {
+ properties: [],
+ };
+ Object.keys(this.editFeature.getProperties()).filter((propName) => {
+ return (propName !== 'geometry');
+ }).forEach((propName) => {
+ templateVar.properties.push({
+ key: propName,
+ value: this.editFeature.get(propName),
// 'type': p.localType
- });
- }, this);
- const options = { jsonp: true, vars: templateVar, parseToHtml: false };
- const htmlAsText = IDEE.template.compileSync(templatePopupHTML, options);
- const popupContent = {
- icon: 'g-cartografia-texto',
- title: POPUP_TITLE,
- content: htmlAsText,
- listeners: [{
- selector: '#m-button-editattributeSave',
- all: true,
- type: 'click',
- callback: (e) => this.saveAttributes_(e),
- }],
- };
- this.popup_ = this.facadeMap_.getPopup();
- if (!IDEE.utils.isNullOrEmpty(this.popup_)) {
- const hasExternalContent = this.popup_.getTabs().some((tab) => {
- return (tab.title !== POPUP_TITLE);
- });
- if (!hasExternalContent) {
- this.facadeMap_.removePopup();
+ });
+ }, this);
+ const options = {
+ jsonp: true,
+ vars: {
+ ...templateVar,
+ translations: {
+ save: getValue('save'),
+ },
+ },
+ parseToHtml: false,
+ };
+ const htmlAsText = IDEE.template.compileSync(templatePopupHTML, options);
+ const popupContent = {
+ icon: 'g-cartografia-texto',
+ title: POPUP_TITLE,
+ content: htmlAsText,
+ listeners: [{
+ selector: '#m-button-editattributeSave',
+ all: true,
+ type: 'click',
+ callback: (e) => this.saveAttributes_(e),
+ }],
+ };
+ this.popup_ = this.facadeMap_.getPopup();
+ if (!IDEE.utils.isNullOrEmpty(this.popup_)) {
+ const hasExternalContent = this.popup_.getTabs().some((tab) => {
+ return (tab.title !== POPUP_TITLE);
+ });
+ if (!hasExternalContent) {
+ this.facadeMap_.removePopup();
+ this.popup_ = new IDEE.Popup();
+ this.popup_.addTab(popupContent);
+ this.facadeMap_.addPopup(this.popup_, coordinate);
+ } else {
+ this.popup_.addTab(popupContent);
+ }
+ } else {
this.popup_ = new IDEE.Popup();
this.popup_.addTab(popupContent);
this.facadeMap_.addPopup(this.popup_, coordinate);
- } else {
- this.popup_.addTab(popupContent);
}
- } else {
- this.popup_ = new IDEE.Popup();
- this.popup_.addTab(popupContent);
- this.facadeMap_.addPopup(this.popup_, coordinate);
}
}
}
@@ -189,7 +200,7 @@ export default class EditAttribute extends IDEE.impl.Control {
if (response.code === 200) {
IDEE.dialog.success(getValue('save_element_successfully'));
} else {
- IDEE.dialog.error(getValue('save_element_error').concat(response.text));
+ IDEE.dialog.error(getValue('exception.save_element_error').concat(response.text));
}
this.unselectFeature_();
});
diff --git a/api-idee-js/src/plugins/wfstcontrols/src/impl/ol/js/savefeature.js b/api-idee-js/src/plugins/wfstcontrols/src/impl/ol/js/savefeature.js
index c287cf0ac..9c1699e8d 100644
--- a/api-idee-js/src/plugins/wfstcontrols/src/impl/ol/js/savefeature.js
+++ b/api-idee-js/src/plugins/wfstcontrols/src/impl/ol/js/savefeature.js
@@ -153,9 +153,9 @@ export default class SaveFeature extends IDEE.impl.Control {
if (response.code === 200 && response.text.indexOf('ExceptionText') === -1 && response.text.indexOf('') === -1) {
IDEE.dialog.success(getValue('save_successfully'));
} else if (response.code === 401) {
- IDEE.dialog.error(getValue('save_error_unauthorized'));
+ IDEE.dialog.error(getValue('exception.save_error_unauthorized'));
} else {
- IDEE.dialog.error(getValue('save_element_error').concat(response.text));
+ IDEE.dialog.error(getValue('exception.save_element_error').concat(response.text));
}
});
diff --git a/api-idee-js/src/plugins/wfstcontrols/test/test.js b/api-idee-js/src/plugins/wfstcontrols/test/test.js
index 14fa4a83f..a46a0566e 100644
--- a/api-idee-js/src/plugins/wfstcontrols/test/test.js
+++ b/api-idee-js/src/plugins/wfstcontrols/test/test.js
@@ -5,7 +5,7 @@ IDEE.language.setLang('es');
const map = IDEE.map({
container: 'mapjs',
- ticket: 'PWUMZ5MQTPUGAEWTHCXVXSFZLLAKXUNKBQSTBOWUDL4AZDOVZKN35B67X6SCPMMISIWNFHW7AAYH4MLGMG4G7NTD3HIALJ42K73PC7W7SQIUUCSKTEIXHCXP6VGOTNXJ4K2SAIEI2GAOURMWOMKWEDURE5K2H357Y35B5GI'
+ ticket: 'PWUMZ5MQTPUGAEWTHCXVXSFZLLAKXUNKBQSTBOWUDL4AZDOVZKN35B67X6SCPMMISIWNFHW7AAYH4MLGMG4G7NTD3HIALJ42K73PC7W7SQIUUCSKTEIXHCXP6VGOTNXJ4K2SAIEI2GAOURMWOMKWEDURE5K2H357Y35B5GI',
});
window.map = map;
@@ -14,14 +14,15 @@ const wfsLayer = new IDEE.layer.WFS({
legend: 'capa wfs',
name: 'superadmin_mispuntos_1758802353451',
geometry: 'LINE',
- extract: false
+ extract: false,
});
map.addWFS(wfsLayer);
const mp = new WFSTControls({
- "features": "drawfeature,modifyfeature,deletefeature,editattribute",
- "proxy": {}
+ features: 'drawfeature,modifyfeature,deletefeature,editattribute',
+ position: 'BR',
+ proxy: {},
});
map.addPlugin(mp); window.mp = mp;
diff --git a/api-idee-parent/pom.xml b/api-idee-parent/pom.xml
index a4013d3c4..d5fb0c899 100644
--- a/api-idee-parent/pom.xml
+++ b/api-idee-parent/pom.xml
@@ -12,7 +12,19 @@
UTF-8
${maven.build.timestamp}
dd-MM-yyyy
+ 2.25.3
+
+
+
+ org.apache.logging.log4j
+ log4j-bom
+ ${log4j2.version}
+ pom
+ import
+
+
+
../api-idee-js
../api-idee-proxy
diff --git a/api-idee-proxy/pom.xml b/api-idee-proxy/pom.xml
index a1bfc8659..3e9e91cef 100644
--- a/api-idee-proxy/pom.xml
+++ b/api-idee-proxy/pom.xml
@@ -70,23 +70,16 @@
- log4j
- log4j
- 1.2.17
-
-
- com.sun.jmx
- jmxri
-
-
- com.sun.jdmk
- jmxtools
-
-
- javax.jms
- jms
-
-
+ org.apache.logging.log4j
+ log4j-api
+
+
+ org.apache.logging.log4j
+ log4j-core
+
+
+ org.apache.logging.log4j
+ log4j-1.2-api
javax.servlet
diff --git a/api-idee-rest/pom.xml b/api-idee-rest/pom.xml
index a23262245..d9b05415a 100644
--- a/api-idee-rest/pom.xml
+++ b/api-idee-rest/pom.xml
@@ -37,6 +37,7 @@
true
**/*.properties
+ **/*.xml
**/*.json
**/resourcesPlugins.json
@@ -134,23 +135,23 @@
-
-
-
- com.spotify
- docker-maven-plugin
- 0.2.11
-
- ${basedir}/../api-idee-parent/src/main/docker/api-idee
-
-
- /
- ${project.build.directory}
- ${project.build.finalName}.war
-
-
-
-
+
+
+
+ com.spotify
+ docker-maven-plugin
+ 0.2.11
+
+ ${basedir}/../api-idee-parent/src/main/docker/api-idee
+
+
+ /
+ ${project.build.directory}
+ ${project.build.finalName}.war
+
+
+
+
@@ -159,11 +160,6 @@
jersey-servlet
${jersey.version}
-
- com.sun.jersey
- jersey-json
- ${jersey.version}
-
junit
junit
@@ -192,26 +188,21 @@
json
20140107
-
- com.sun.mail
- javax.mail
- 1.6.2
-
-
- com.sun.jersey.contribs
- jersey-multipart
- 1.19
-
-
- org.freemarker
- freemarker
- 2.3.23
-
-
- org.codehaus.jackson
- jackson-mapper-asl
- 1.9.13
-
+
+ com.sun.mail
+ javax.mail
+ 1.6.2
+
+
+ com.sun.jersey.contribs
+ jersey-multipart
+ 1.19
+
+
+ org.freemarker
+ freemarker
+ 2.3.23
+
${project.groupId}
diff --git a/api-idee-rest/src/main/java/es/api_idee/api/ActionsWS.java b/api-idee-rest/src/main/java/es/api_idee/api/ActionsWS.java
index 7b6e8ac7f..e5b1f4627 100644
--- a/api-idee-rest/src/main/java/es/api_idee/api/ActionsWS.java
+++ b/api-idee-rest/src/main/java/es/api_idee/api/ActionsWS.java
@@ -1,5 +1,8 @@
package es.api_idee.api;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
import java.util.ResourceBundle;
import javax.servlet.ServletContext;
@@ -193,14 +196,14 @@ public String showAvailableExternalPlugins(@QueryParam("callback") String callba
@Path("/plugins/external/reload")
public String reloadExternalPlugins(@QueryParam("callback") String callbackFn) {
PluginsManager.init(context);
-
+
int count = PluginsManager.reloadExternalPlugins();
-
+
JSONObject result = new JSONObject();
result.put("success", true);
result.put("message", "Lista de plugins externos recargada correctamente");
result.put("count", count);
-
+
return JSBuilder.wrapCallback(result, callbackFn);
}
@@ -229,7 +232,7 @@ public String showVersion(@QueryParam("callback") String callbackFn) {
* Provides SVG collections
*
* @param callbackFn the name of the javascript function to execute as callback
- * @param name name collection
+ * @param name name collection
*
* @return the javascript code
*/
@@ -238,7 +241,8 @@ public String showVersion(@QueryParam("callback") String callbackFn) {
public String resourceSVG(@QueryParam("callback") String callbackFn, @QueryParam("name") String name) {
JSONObject result = new JSONObject();
try {
- String file = new String(Files.readAllBytes(Paths.get(context.getRealPath("/WEB-INF/classes/resources_svg.json"))));
+ String file = new String(
+ Files.readAllBytes(Paths.get(context.getRealPath("/WEB-INF/classes/resources_svg.json"))));
JSONArray allCollectionsSVG = (JSONArray) new JSONObject(file).get("collections");
JSONObject collectionSVG = null;
@@ -278,7 +282,7 @@ public String resourceSVG(@QueryParam("callback") String callbackFn, @QueryParam
* Provides GeoData collections
*
* @param callbackFn the name of the javascript function to execute as callback
- * @param name name of the collection
+ * @param name name of the collection
*
* @return the javascript code
*/
@@ -287,7 +291,8 @@ public String resourceSVG(@QueryParam("callback") String callbackFn, @QueryParam
public String resourceGeoData(@QueryParam("callback") String callbackFn, @QueryParam("name") String name) {
JSONObject result = new JSONObject();
try {
- String file = new String(Files.readAllBytes(Paths.get(context.getRealPath("/WEB-INF/classes/resources_geodata.json"))));
+ String file = new String(
+ Files.readAllBytes(Paths.get(context.getRealPath("/WEB-INF/classes/resources_geodata.json"))));
JSONArray allCollectionsGeoData = (JSONArray) new JSONObject(file).get("collections");
JSONObject collectionGeoData = null;
@@ -327,10 +332,11 @@ public String resourceGeoData(@QueryParam("callback") String callbackFn, @QueryP
* Provides the JS and CSS resources of the plugins for each version of API_IDEE
*
* @param callbackFn the name of the javascript function to execute as callback
- * @param name plugin name to filter
- * @param version version number API_IDEE to filter
- * @param type file type to filter 'css' or 'js', only used when both name and version are not null.
- * While 'api-idee' shows version this plugin is attached to.
+ * @param name plugin name to filter
+ * @param version version number API_IDEE to filter
+ * @param type file type to filter 'css' or 'js', only used when both name
+ * and version are not null.
+ * While 'api-idee' shows version this plugin is attached to.
*
* @return the resources available for the plugins
*/
@@ -345,15 +351,45 @@ public Response getResourcesPlugins(
Response response = null;
try {
- String file = new String(Files.readAllBytes(Paths.get(context.getRealPath("/WEB-INF/classes/resourcesPlugins.json"))));
- JSONArray allPlugins = (JSONArray) new JSONObject(file).get("plugins");
+ String file = new String(
+ Files.readAllBytes(Paths.get(context.getRealPath("/WEB-INF/classes/resourcesPlugins.json"))));
+ String fileExt = null;
+ try {
+ String urlBase = configProperties.getString("plugins.external.base.url");
+ URL url = new URL(urlBase + "/data/resourcesPlugins.json");
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ conn.setRequestMethod("GET");
+
+ BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+ StringBuilder res = new StringBuilder();
+ String line;
+ while ((line = br.readLine()) != null) {
+ res.append(line);
+ }
+ fileExt = res.toString();
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ JSONArray intPlugins = (JSONArray) new JSONObject(file).get("plugins");
+ JSONArray extPlugins1 = (JSONArray) new JSONObject(fileExt).get("plugins");
+ List allPlugins = new ArrayList<>();
+ for (int i = 0; i < extPlugins1.length(); i++) {
+ allPlugins.add(extPlugins1.getJSONObject(i));
+ }
+ for (int i = 0; i < intPlugins.length(); i++) {
+ allPlugins.add(intPlugins.getJSONObject(i));
+ }
+ allPlugins.sort(Comparator.comparing(o -> o.getString("name")));
+
JSONArray arrayResults = new JSONArray();
JSONObject plugin = null;
Boolean showAllPlugins = name == null;
Boolean showAllVersions = version == null;
- for (int i = 0; i < allPlugins.length(); i++) {
+ for (int i = 0; i < allPlugins.size(); i++) {
plugin = (JSONObject) allPlugins.get(i);
String namePlugin = (String) plugin.get("name");
boolean findPlugin = !showAllPlugins && name.equals(namePlugin);
@@ -362,6 +398,7 @@ public Response getResourcesPlugins(
JSONArray versions = (JSONArray) plugin.get("versions");
JSONObject aux = new JSONObject();
aux.put("name", namePlugin);
+ aux.put("obsolete", (String)plugin.get("obsolete"));
JSONArray links = new JSONArray();
for (int j = 0; j < versions.length(); j++) {
@@ -377,6 +414,7 @@ public Response getResourcesPlugins(
}
aux.put("resources", links);
arrayResults.put(aux);
+
if (findPlugin) {
break;
}
@@ -384,10 +422,11 @@ public Response getResourcesPlugins(
}
if (name != null && version != null && type != null) {
- // Expected "api-idee,css,js" types from api-idee-rest/src/main/resources/properties/resourcesPlugins.json
+ // Expected "api-idee,css,js" types from
+ // api-idee-rest/src/main/resources/properties/resourcesPlugins.json
String resourceType = (String) (((JSONArray) arrayResults
- .getJSONObject(0).get("resources")).getJSONObject(0))
- .get(type); // Values of Type that are not "js", "css" or "api-idee" cause "not found error"
+ .getJSONObject(0).get("resources")).getJSONObject(0))
+ .get(type); // Values of Type that are not "js", "css" or "api-idee" cause "not found error"
if (type.equals("api-idee")) {
// Avoid type "api-idee" version being interpreted as protocol
response = Response.ok(resourceType, MediaType.TEXT_HTML).build();
@@ -420,7 +459,7 @@ public Response getResourcesPlugins(
} catch (Exception e) {
e.printStackTrace();
- response = Response.status(400).entity("An error has occurred " +e.toString()).build();
+ response = Response.status(400).entity("An error has occurred " + e.toString()).build();
}
return response;
@@ -436,10 +475,11 @@ public Response getResourcesPlugins(
*/
@GET
@Path("/versions")
- public String showVersions (@QueryParam("callback") String callbackFn) {
+ public String showVersions(@QueryParam("callback") String callbackFn) {
JSONObject versionsJSON = new JSONObject();
- // "versions" from api-idee-rest/.../configuration.properties of "versions.names" from api-idee-parent/.../*.properties
+ // "versions" from api-idee-rest/.../configuration.properties of
+ // "versions.names" from api-idee-parent/.../*.properties
String[] versions = configProperties.getString("versions").split(",");
// URLs to tiles
diff --git a/api-idee-rest/src/main/resources/properties/log4j.properties b/api-idee-rest/src/main/resources/properties/log4j.properties
deleted file mode 100644
index 393e0877e..000000000
--- a/api-idee-rest/src/main/resources/properties/log4j.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-# Root logger option
-log4j.rootLogger=INFO, stdout
-
-# Direct log messages to stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
\ No newline at end of file
diff --git a/api-idee-rest/src/main/resources/properties/log4j2.xml b/api-idee-rest/src/main/resources/properties/log4j2.xml
new file mode 100644
index 000000000..22bf8c71f
--- /dev/null
+++ b/api-idee-rest/src/main/resources/properties/log4j2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/api-idee-rest/src/main/resources/properties/resourcesPlugins.json b/api-idee-rest/src/main/resources/properties/resourcesPlugins.json
index 5735568b2..b652fee19 100644
--- a/api-idee-rest/src/main/resources/properties/resourcesPlugins.json
+++ b/api-idee-rest/src/main/resources/properties/resourcesPlugins.json
@@ -2,6 +2,7 @@
"plugins": [
{
"name": "backimglayer",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -22,6 +23,7 @@
},
{
"name": "basic",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -42,6 +44,7 @@
},
{
"name": "comparators",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -62,6 +65,7 @@
},
{
"name": "contactlink",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -82,6 +86,7 @@
},
{
"name": "filteredsearch",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -97,6 +102,7 @@
},
{
"name": "help",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -117,6 +123,7 @@
},
{
"name": "incicarto",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -137,6 +144,7 @@
},
{
"name": "infocoordinates",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -157,6 +165,7 @@
},
{
"name": "information",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -177,6 +186,7 @@
},
{
"name": "layerswitcher",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -197,6 +207,7 @@
},
{
"name": "locator",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -217,6 +228,7 @@
},
{
"name": "locatorscn",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -237,6 +249,7 @@
},
{
"name": "magnify",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -252,6 +265,7 @@
},
{
"name": "mapheader",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -267,6 +281,7 @@
},
{
"name": "mapfooter",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -282,6 +297,7 @@
},
{
"name": "maxextzoom",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -297,6 +313,7 @@
},
{
"name": "measurebar",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -317,6 +334,7 @@
},
{
"name": "modal",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -337,6 +355,7 @@
},
{
"name": "mousesrs",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -357,6 +376,7 @@
},
{
"name": "overviewmap",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -377,6 +397,7 @@
},
{
"name": "printviewmanagement",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -397,6 +418,7 @@
},
{
"name": "queryattributes",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -417,6 +439,7 @@
},
{
"name": "selectionzoom",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -437,6 +460,7 @@
},
{
"name": "sharemap",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -457,6 +481,7 @@
},
{
"name": "storymap",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -477,6 +502,7 @@
},
{
"name": "stylemanager",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -497,6 +523,7 @@
},
{
"name": "timeline",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -517,6 +544,7 @@
},
{
"name": "vectorsmanagement",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -537,6 +565,7 @@
},
{
"name": "viewmanagement",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
@@ -557,6 +586,7 @@
},
{
"name": "wfstcontrols",
+ "obsolete": "false",
"versions": [
{
"api-idee": "1.1.0",
diff --git a/api-idee-rest/src/main/webapp/wfstcontrols.jsp b/api-idee-rest/src/main/webapp/wfstcontrols.jsp
index fe1c3131a..bb45a9682 100644
--- a/api-idee-rest/src/main/webapp/wfstcontrols.jsp
+++ b/api-idee-rest/src/main/webapp/wfstcontrols.jsp
@@ -45,7 +45,6 @@
-
@@ -153,10 +152,6 @@
map.removePlugins(mp);
});
- buttonApi.addEventListener('click', function() {
- const posicion = selectPosicion.options[selectPosicion.selectedIndex].value;
- window.location.href = 'https://api-ideedes.grupotecopy.es/api-idee//api-idee/?wfstcontrols=' + posicion;
- });