Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapstore2 Elevation Slider tool #1697

Merged
merged 19 commits into from
Apr 7, 2017

Conversation

mricca
Copy link
Contributor

@mricca mricca commented Apr 6, 2017

Layer configuration example:

"params": {
	"DIM_DEPTH": ["1.5"] 
},
"elevations": {
	"name": "DIM_DEPTH", _Name of the elevation params in geoserver_
	"units": "Meters", _Units of Measure_
	"positive": false, _to be set according to the meaning of the variable_
	"showChart": true, _Set to false if you do not view the chart with the slider_
	"values": ["1.5","5.0",...] _hard coded value from the capabilities_
}

Full example:

{
	"group": "METOC Forecasts",
	"name": "gliders:salinity",
	"title": "Salinity",
	"type": "wms",
	"url": "http://cloudsdi.geo-solutions.it/geoserver/wms",
	"bbox": {
		"crs": "EPSG:4326",
			"bounds": {
			"minx": "6",
			"miny": "41",
			"maxx": "13",
			"maxy": "46"
		}
	},
	"visibility": true,
	"singleTile": true,
	"format": "image/png8",
	"params": {
		"DIM_DEPTH": ["1.5"]
	},
	"elevations": {
		"name": "DIM_DEPTH",
		"units": "Meters",
		"positive": false,
		"showChart": true,
		"values": ["1.5","5.0","10.0","15.0","20.0","25.0","30.0","35.0","40.0","45.0","50.0","60.0","70.0","80.0","90.0","100.0","120.0","140.0","160.0","180.0","200.0","225.0","250.0","275.0","300.0","350.0","400.0","450.0","500.0","600.0","700.0","800.0","900.0","1000.0","1200.0","1400.0","1600.0","1800.0","2000.0","2400.0","2800.0"]
	}
}

…e v6.10.0 and npm 3.10.10 on windows10 64bit
@simboss simboss added the ready label Apr 6, 2017
@@ -53,6 +54,7 @@
"save": "Speichern",
"saveAs": "Speichern als...",
"opacity": "Deckkraft",
"elevation": "Elevation",
"close": "Schliessen",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be translated this?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 77.329% when pulling be2ae87 on mricca:mapstore2_elevslider into f7437a4 on geosolutions-it:master.

</div>
);
},
calcolateRange(values, min, max, dif, firstVal, lastVal) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calculate

let arr = [];
let percText = "";
let range = {min: firstVal, max: lastVal};
values.map(function(currentValue, i) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

map requires a pure function, if you have side effects use forEach

<Slider
snap= {true}
start={[parseFloat((start))] || [0.0]}
range= {this.calcolateRange(values, min, max, dif, firstVal, lastVal)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calculate

package.json Outdated
@@ -161,6 +162,7 @@
"url": "0.10.3",
"uuid": "3.0.1",
"w3c-schemas": "1.3.1",
"wnumb": "1.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have I18N.NumberFormat for number formatting

Fix requested changes to Elev Slider
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 77.329% when pulling ecc1f84 on mricca:mapstore2_elevslider into f7437a4 on geosolutions-it:master.

@MV88 MV88 merged commit b41c97a into geosolutions-it:master Apr 7, 2017
@MV88 MV88 removed the ready label Apr 7, 2017
@MV88 MV88 mentioned this pull request Apr 7, 2017
@mricca mricca deleted the mapstore2_elevslider branch April 7, 2017 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants