Skip to content

Commit

Permalink
Merge pull request #462 from sigcorporativo-ja/develop
Browse files Browse the repository at this point in the history
v6.6.0
  • Loading branch information
fbma authored Apr 10, 2024
2 parents d235a00 + 866c56c commit fd8c913
Show file tree
Hide file tree
Showing 96 changed files with 1,669 additions and 208 deletions.
2 changes: 1 addition & 1 deletion mapea-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mapea",
"version": "6.5.0",
"version": "6.6.0",
"description": "Herramienta para desarrollo de mapas interactivos de forma sencilla",
"keywords": [
"map",
Expand Down
2 changes: 1 addition & 1 deletion mapea-js/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>es.juntadeandalucia.mapea</groupId>
<artifactId>mapea-parent</artifactId>
<version>6.5.0</version>
<version>6.6.0</version>
<relativePath>../mapea-parent/pom.xml</relativePath>
</parent>
<licenses>
Expand Down
2 changes: 1 addition & 1 deletion mapea-js/src/facade/assets/css/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
}

.m-popup>div.m-content>div.m-header>a.m-popup-closer:after {
content: "\e919";
content: "\2716";
}

.m-popup.m-full.m-has-tabs>div.m-content>div.m-header>a.m-popup-closer {
Expand Down
10 changes: 5 additions & 5 deletions mapea-js/src/facade/js/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ class Map extends Base {
*/
this.ticket_ = null;

// ticket
if (!isNullOrEmpty(params.ticket)) {
this.setTicket(params.ticket);
}

// adds class to the container
params.container.classList.add('m-mapea-container');
if (!isNullOrEmpty(params.bgColorContainer)) {
Expand Down Expand Up @@ -334,11 +339,6 @@ class Map extends Base {
this.addLabel(params.label);
}

// ticket
if (!isNullOrEmpty(params.ticket)) {
this.setTicket(params.ticket);
}

// initial zoom
if (isNullOrEmpty(params.bbox) && isNullOrEmpty(params.zoom) && isNullOrEmpty(params.center)) {
this.zoomToMaxExtent(true);
Expand Down
13 changes: 13 additions & 0 deletions mapea-js/src/facade/js/layer/GeoJSON.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,25 @@ class GeoJSON extends LayerVector {
if (obj instanceof GeoJSON) {
equals = this.name === obj.name;
equals = equals && (this.extract === obj.extract);
equals = equals && (this.template === obj.template);
equals = equals && (this.id === obj.id);
}

return equals;
}

/**
* Sets the url of the layer
*
* @function
* @public
* @param {String} newURL URL
* @api
*/
setURL(newURL) {
this.getImpl().setURL(newURL);
}

/**
* Sets the source of the layer, in GeoJSON format
*
Expand Down
27 changes: 27 additions & 0 deletions mapea-js/src/facade/js/layer/KML.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class KML extends LayerVector {
// extract
this.extract = parameters.extract;

// template
this.template = parameters.template;

// options
this.options = options;

Expand Down Expand Up @@ -98,6 +101,17 @@ class KML extends LayerVector {
}
}

/**
* 'template' the features properties
*/
get template() {
return this.getImpl().template;
}

set template(newTemplate) {
this.getImpl().template = newTemplate;
}

/**
* 'options' the layer options
*/
Expand All @@ -109,6 +123,18 @@ class KML extends LayerVector {
this.getImpl().options = newOptions;
}

/**
* Sets the url of the layer
*
* @function
* @public
* @param {String} newURL URL
* @api
*/
setURL(newURL) {
this.getImpl().setURL(newURL);
}

/**
* Checks if an object is equal to this layer. Two KML layers are equal if both of them
* are instances of KML, and have the same 'name' and 'extract' attributes
Expand All @@ -124,6 +150,7 @@ class KML extends LayerVector {
equals = (this.url === obj.url);
equals = equals && (this.name === obj.name);
equals = equals && (this.extract === obj.extract);
equals = equals && (this.template === obj.template);
equals = equals && (this.id === obj.id);
}

Expand Down
2 changes: 1 addition & 1 deletion mapea-js/src/facade/js/layer/LayerGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class LayerGroup extends MObject {
if (isNullOrEmpty(index)) {
this.children_.unshift(child);
} else {
this.children_.splice(index - 1, 0, child);
this.children_.splice(index, 0, child);
zIndex = this.getZIndex() + index;
}
if (child instanceof LayerGroup) {
Expand Down
14 changes: 14 additions & 0 deletions mapea-js/src/facade/js/layer/MVT.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ class MVT extends Vector {
}
}

/**
* This function sets
* the tileLoadFunction
* On the implementation
*
* @function
* @public
* @param {Function} func Function to override
* @api
*/
setTileLoadFunction(func){
this.getImpl().setTileLoadFunction(func);
}

/**
* This method calculates the maxExtent of this layer:
* 1. Check if the user specified a maxExtent parameter
Expand Down
38 changes: 38 additions & 0 deletions mapea-js/src/facade/js/layer/Mapbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,44 @@ class Mapbox extends LayerBase {
}
}

/**
* This function sets
* the tileLoadFunction
* On the implementation
*
* @function
* @public
* @param {Function} func Function to override
* @api
*/
setTileLoadFunction(func){
this.getImpl().setTileLoadFunction(func);
}

/**
* Sets the url of the layer
*
* @function
* @public
* @param {String} newURL URL
* @api
*/
setURL(newURL) {
this.getImpl().setURL(newURL);
}

/**
* Sets the name of the layer
*
* @function
* @public
* @param {String} newName Name
* @api
*/
setName(newName) {
this.getImpl().setName(newName);
}

/**
* Checks if an object is equal to this layer, which means that it is a Mapbox Layer instance and
* has the same url, name and options.
Expand Down
14 changes: 14 additions & 0 deletions mapea-js/src/facade/js/layer/OSM.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@ class OSM extends LayerBase {
}
}

/**
* This function sets
* the tileLoadFunction
* On the implementation
*
* @function
* @public
* @param {Function} func Function to override
* @api
*/
setTileLoadFunction(func){
this.getImpl().setTileLoadFunction(func);
}

/**
* This function checks if an object is equals
* to this layer
Expand Down
14 changes: 14 additions & 0 deletions mapea-js/src/facade/js/layer/Vector.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class Vector extends LayerBase {
this.extract = true; // by default
}

// template
this.template = parameters.template;

/**
* Style of the layer
* @private
Expand Down Expand Up @@ -99,6 +102,17 @@ class Vector extends LayerBase {
}
}

/**
* 'template' the features properties
*/
get template() {
return this.getImpl().template;
}

set template(newTemplate) {
this.getImpl().template = newTemplate;
}

/**
* Adds features to layer. Only features that are not already in the layer
* will be added. Two features are equal if the have the same id.
Expand Down
53 changes: 53 additions & 0 deletions mapea-js/src/facade/js/layer/WFS.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ class WFS extends Vector {

// extract
this.extract = parameters.extract;

// template
this.template = parameters.template;
}

/**
Expand Down Expand Up @@ -164,6 +167,56 @@ class WFS extends Vector {
this.getImpl().version = '1.0.0'; // default value
}
}

/**
* Sets the url of the layer
*
* @function
* @public
* @param {String} newURL URL
* @api
*/
setURL(newURL) {
this.getImpl().setURL(newURL);
}

/**
* Sets the name of the layer
*
* @function
* @public
* @param {String} newName Name
* @api
*/
setName(newName) {
this.getImpl().setName(newName);
}

/**
* Sets the namespace of the layer
*
* @function
* @public
* @param {String} newNamespace Namespace
* @api
*/
setNamespace(newNamespace) {
this.getImpl().setNamespace(newNamespace);
}

/**
* Sets the geometry of the layer
*
* @function
* @public
* @param {String} newGeometry Geometry
* @api
*/
setGeometry(newGeometry) {
this.geometry = newGeometry;
this.getImpl().setGeometry(newGeometry);
}

/**
* Sets a CQL string to apply to the layer. A new query will be made to the WFS server.
* @param {String} cql CQL to apply
Expand Down
42 changes: 41 additions & 1 deletion mapea-js/src/facade/js/layer/WMS.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class WMS extends LayerBase {
this.legend = parameters.legend;

// cql
this.cql = parameters.cql;
if (vendorOptions?.cql) {
this.cql = vendorOptions.cql;
}

// version
this.version = parameters.version;
Expand Down Expand Up @@ -181,6 +183,44 @@ class WMS extends LayerBase {
this.getImpl().options = newOptions;
}

/**
* This function sets
* the tileLoadFunction
* On the implementation
*
* @function
* @public
* @param {Function} func Function to override
* @api
*/
setTileLoadFunction(func){
this.getImpl().setTileLoadFunction(func);
}

/**
* Sets the url of the layer
*
* @function
* @public
* @param {String} newURL URL
* @api
*/
setURL(newURL) {
this.getImpl().setURL(newURL);
}

/**
* Sets the name of the layer
*
* @function
* @public
* @param {String} newName Name
* @api
*/
setName(newName) {
this.getImpl().setName(newName);
}

/**
* Calculates the maxExtent of this layer, being the first value found in this order:
* 1. checks if the user specified a maxExtent parameter for the layer.
Expand Down
Loading

0 comments on commit fd8c913

Please sign in to comment.