[fusion-commits] r3040 - sandbox/cms_refactor/lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Jul 30 08:46:51 PDT 2018
Author: jng
Date: 2018-07-30 08:46:51 -0700 (Mon, 30 Jul 2018)
New Revision: 3040
Modified:
sandbox/cms_refactor/lib/ApplicationDefinition.js
Log:
Special case handling for "urls" layer option (for XYZ layers). It may have more than 1 element and we need to preserve this.
Modified: sandbox/cms_refactor/lib/ApplicationDefinition.js
===================================================================
--- sandbox/cms_refactor/lib/ApplicationDefinition.js 2018-07-30 15:37:02 UTC (rev 3039)
+++ sandbox/cms_refactor/lib/ApplicationDefinition.js 2018-07-30 15:46:51 UTC (rev 3040)
@@ -509,27 +509,31 @@
this.layerOptions = {};
if (tagOptions && tagOptions[0]) {
for (var key in tagOptions[0]) {
- var val = tagOptions[0][key][0];
- if (val.toFloat().toString() == val) {
- this.layerOptions[key] = val.toFloat();
+ if (key == "urls") {
+ this.layerOptions[key] = tagOptions[0][key];
} else {
- if (val.toLowerCase() == 'true') {
- this.layerOptions[key] = true;
- } else if (val.toLowerCase() == 'false') {
- this.layerOptions[key] = false;
- } else {
- this.layerOptions[key] = val;
- }
+ var val = tagOptions[0][key][0];
+ if (val.toFloat().toString() == val) {
+ this.layerOptions[key] = val.toFloat();
+ } else {
+ if (val.toLowerCase() == 'true') {
+ this.layerOptions[key] = true;
+ } else if (val.toLowerCase() == 'false') {
+ this.layerOptions[key] = false;
+ } else {
+ this.layerOptions[key] = val;
+ }
+ }
+ if (key == 'maxExtent' || key == 'minExtent' || key == 'restrictedExtent') {
+ this.layerOptions[key] = OpenLayers.Bounds.fromString(this.layerOptions[key]);
+ }
+ if (key == 'resolutions' || key == 'scales') {
+ this.layerOptions[key] = this.layerOptions[key].split(',');
+ for (var i=0; i<this.layerOptions[key].length; i++) {
+ this.layerOptions[key][i] = this.layerOptions[key][i].toFloat();
+ }
+ }
}
- if (key == 'maxExtent' || key == 'minExtent' || key == 'restrictedExtent') {
- this.layerOptions[key] = OpenLayers.Bounds.fromString(this.layerOptions[key]);
- }
- if (key == 'resolutions' || key == 'scales') {
- this.layerOptions[key] = this.layerOptions[key].split(',');
- for (var i=0; i<this.layerOptions[key].length; i++) {
- this.layerOptions[key][i] = this.layerOptions[key][i].toFloat();
- }
- }
}
}
var tagParams = this.extension.Parameters;
More information about the fusion-commits
mailing list