| Extends | Internal Rj.widget._Diagram |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Optional dataSeries | Rj.util.DataSeries | The series to be plotted. The diagram is plotted only when at least a dataSeries exists. | [ ] |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Inherited title | String | The title displayed above the diagram. | None |
| Inherited xLabel | String | The label of the X axis. | X |
| Inherited yLabel | String | The label of the Y axis. | Y |
| Inherited tooltip | Bool | Indicates whether a Tooltip with tips about how the diagram works should be shown. | false |
| Inherited dataSeries | Rj.util.DataSeries | The series to be plotted. | [ ] |
| Inherited width | Int | The width of the diagram. | 600 |
| Inherited height | Int | The height of the diagram. | 300 |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| Inherited addDataSeries | Void | {Rj.util.DataSeries} series - the series object. | Adds a data series to the diagram. |
| Inherited removeDataSeries | Void | {String} seriesName - the name of the data series to be removed. | Removes a data series from the diagram. |
| Inherited getData | Array | - | Returns the plotted data as a multidimensional array of the form: [ [ [index, element], [index, element], ... ], [ [ index, element], [index, element], ... ], ... ] |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
<div id='area-widget'></div>
var dataSeries = new Rj.util.DataSeries([1,5,2,4,10]);
var widget = new Rj.widget.AreaDiagram("#area-widget", dataSeries);
| Extends | Internal Rj.widget._Diagram |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Optional dataSeries | Rj.util.DataSeries | The series to be plotted. The diagram is plotted only when at least a dataSeries exists. | [ ] |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Inherited title | String | The title displayed above the diagram. | None |
| Inherited xLabel | String | The label of the X axis. | X |
| Inherited yLabel | String | The label of the Y axis. | Y |
| Inherited tooltip | Bool | Indicates whether a Tooltip with tips about how the diagram works should be shown. | false |
| Inherited dataSeries | Rj.util.DataSeries | The series to be plotted. | [ ] |
| Inherited width | Int | The width of the diagram. | 600 |
| Inherited height | Int | The height of the diagram. | 300 |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| Inherited addDataSeries | Void | {Rj.util.DataSeries} series - the series object. | Adds a data series to the diagram. |
| Inherited removeDataSeries | Void | {String} seriesName - the name of the data series to be removed. | Removes a data series from the diagram. |
| Inherited getData | Array | - | Returns the plotted data as a multidimensional array of the form: [ [ [index, element], [index, element], ... ], [ [ index, element], [index, element], ... ], ... ] |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
<div id='bar-widget'></div>
var dataSeries = new Rj.util.DataSeries([1,5,2,4,10]);
var widget = new Rj.widget.BarDiagram("#bar-widget", dataSeries);
| Extends | Internal Rj.widget._Diagram |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Optional dataSeries | Rj.util.DataSeries | The series to be plotted. The diagram is plotted only when at least a dataSeries exists. | [ ] |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Inherited title | String | The title displayed above the diagram. | None |
| Inherited xLabel | String | The label of the X axis. | X |
| Inherited yLabel | String | The label of the Y axis. | Y |
| Inherited tooltip | Bool | Indicates whether a Tooltip with tips about how the diagram works should be shown. | false |
| Inherited dataSeries | Rj.util.DataSeries | The series to be plotted. | [ ] |
| Inherited width | Int | The width of the diagram. | 600 |
| Inherited height | Int | The height of the diagram. | 300 |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| Inherited addDataSeries | Void | {Rj.util.DataSeries} series - the series object. | Adds a data series to the diagram. |
| Inherited removeDataSeries | Void | {String} seriesName - the name of the data series to be removed. | Removes a data series from the diagram. |
| Inherited getData | Array | - | Returns the plotted data as a multidimensional array of the form: [ [ [index, element], [index, element], ... ], [ [ index, element], [index, element], ... ], ... ] |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
<div id='linear-widget'></div>
var dataSeries = new Rj.util.DataSeries([1,5,2,4,10]);
var widget = new Rj.widget.LinearDiagram("#linear-widget", dataSeries);
| Extends | Internal Rj.widget._Diagram |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Optional dataSeries | Rj.util.DataSeries | The series to be plotted. The diagram is plotted only when at least a dataSeries exists. | [ ] |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Inherited title | String | The title displayed above the diagram. | None |
| Inherited xLabel | String | The label of the X axis. | X |
| Inherited yLabel | String | The label of the Y axis. | Y |
| Inherited tooltip | Bool | Indicates whether a Tooltip with tips about how the diagram works should be shown. | false |
| Inherited dataSeries | Rj.util.DataSeries | The series to be plotted. | [ ] |
| Inherited width | Int | The width of the diagram. | 600 |
| Inherited height | Int | The height of the diagram. | 300 |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| Inherited addDataSeries | Void | {Rj.util.DataSeries} series - the series object. | Adds a data series to the diagram. |
| Inherited removeDataSeries | Void | {String} seriesName - the name of the data series to be removed. | Removes a data series from the diagram. |
| Inherited getData | Array | - | Returns the plotted data as a multidimensional array of the form: [ [ [index, element], [index, element], ... ], [ [ index, element], [index, element], ... ], ... ] |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
<div id='scatter-widget'></div>
var dataSeries = new Rj.util.DataSeries([1,5,2,4,10]);
var widget = new Rj.widget.ScatterDiagram("#scatter-widget", dataSeries);
| Extends | Internal Rj.widget._OutputWidget |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| format | String | The data format (e.g. 'image/png'). | None |
| Optional arrayBufData | ArrayBuffer | The data stream. The image is not rendered until a data stream is set. | None |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| width | Int | The width of the image. | None |
| height | Int | The height of the image. | None |
| binaryData | ArrayBuffer | The data stream. | None |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
The following example shows how to display an image that comes as response from a WCPS query.
<div id='image-widget'></div>
//Set up the WCPS Service
Rj.util.ConfigManager.setWCPSService({
url : "http://flanche.net:8080/petascope/",
queryParameter: "request"
});
//Declare the query, with binary format
var query = new Rj.query.WCPSQuery('for m in (mean_summer_airtemp) return encode((char) m, "png" )');
query.setBinaryFormat(true);
//evaluate the query and set-up the widget from its response
query.evaluate(function(response){
var img = new Rj.widget.BinaryImage("#image-widget", "image/png", response);
img.setWidth(300);
});
//Set up the WCPS Service
Rj.util.ConfigManager.setWCPSService({
url : "http://example.org:8080/petascope/",
queryParameter: "request"
});
//Declare the query, with binary format
var query = new Rj.query.WCPSQuery('for m in (mean_summer_airtemp) return encode((char) m, "png" )');
query.setBinaryFormat(true);
var img = new Rj.widget.BinaryImage("#image-widget", "image/png");
img.bind(query);
query.evaluate();
| Extends | Internal Rj.widget._OutputWidget |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Optional min | Int | The minimum value that can be displayed by the gauge. | 0 |
| Optional max | Int | The maximum value that can be displayed by the gauge. | 100 |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Inherited value | Int | The value displayed by the gauge. | The min attribute. |
| min | Int | The minimum value that can be displayed by the gauge. | 0 |
| max | Int | The maximum value that can be displayed by the gauge. | 100 |
| title | String | The title displayed above the gauge. | None |
| label | String | The label displayed next to the gauge. | None |
| widthScale | Float | A number between 0 and 1 to which the width of the gauge is scaled. | 1 |
| showMinMax | Bool | Indicates whether the minimum and maximum values are shown at the ends of the gauge. | true |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
| valuechanged | value | Event fired when the value of the widget changes. |
The following example shows how to display a gauge which takes a random value every 2 seconds.
<div id='gauge-widget'></div>
var gauge = new Rj.widget.Gauge("#gauge-widget", 0, 1000);
setInterval(function(){
var value = Math.random()*1000;
gauge.setValue(value);
}, 2000);
| Extends | Internal Rj.widget._OutputWidget |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Inherited value | Float | The value displayed by the widget. | 0.00 |
| intDigits | Int | The number of integer digits that the led has. | 4 |
| fracDigits | Int | The number of fractional digits that the led has. | 2 |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
| valuechanged | value | Event fired when the value of the widget changes. |
The following example shows how to display a led which takes a random value every 2 seconds.
<div id='led-widget'></div>
var led = new Rj.widget.Led("#led-widget");
setInterval(function(){
var value = Math.random()*100 + Math.random();
led.setValue(value);
}, 2000);
| Extends | Internal Rj.widget._OutputWidget |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Optional options | Object | An OpenLayers configuration object. | None |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| map | Object | The OpenLayers map object. | None |
| layers | Array | The map layers, as an array of Rj.util.MapLayer objects. | [ ] |
| width | Int | The width of the map. | 600 |
| height | Int | The height of the map. | 300 |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| addLayers | Void | Array of {Rj.util.MapLayer} layers - the layers to be added. | Adds layers to the widget. |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
<div id='map-widget'></div>
var WMS_SERVICE_URL = "http://212.201.49.173:8080/rasogc/rasogc";
var map = new Rj.widget.Map('#map-widget', {
projection : "EPSG:32633",
maxExtent : new OpenLayers.Bounds(489750,7988500,492750,7990000),
tileSize : new OpenLayers.Size(500, 500),
numZoomLevel : 4
});
var layerHakoon = new Rj.util.MapLayer("Hakoon Drive", WMS_SERVICE_URL, {
layers: 'Hakoon_Dive_1',
styles: 'standard',
format : "image/png",
transparent: "true",
version : "1.1.0",
exceptions : 'application/vnd.ogc.se_xml',
customdem : 'minLevel,maxLevel,T'
},
{
isBaseLayer: false,
transitionEffect : 'resize'
});
map.addLayers([layerHakoon]);
| Extends | Internal Rj.widget._OutputWidget |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None | Inherited value | Int | The value displayed by the widget. | None |
| labelSuffix | String | The string displayed next to the value of the widget. | None |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
| valuechanged | value | Event fired when the value of the widget changes. |
The follwoing examples shows how to display a SpeedoMeter widget that takes a random value every 5 seconds.
<div id='speedometer-widget'></div>
var speedoMeter = new Rj.widget.SpeedoMeter("#speedometer-widget");
setInterval(function(){
var value = Math.random()*100;
speedoMeter.setValue(value);
}, 2000);
| Extends | Internal Rj.widget._OutputWidget |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None | Inherited value | String | The value displayed by the tooltip. | None |
| pretext | String | The string displayed before the value of the tooltip. | None |
| postext | String | The string displayed after the value of the tooltip. | None |
| adjust | Object | An object containing qTip adjustments. | None |
| place | String | Indicates where the tooltip is placed. | bottom |
| mouse | Bool | Indicates whether the tooltip follows the mouse. | false |
| delay | Int | The delay, in ms, at which the tooltip appears. | 1000 |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
| valuechanged | value | Event fired when the value of the widget changes. |
<div id='tooltip-widget' style='width:100px; margin-top:100px;'>Hover me!</div>
var tooltip = new Rj.widget.ToolTip("#tooltip-widget");
tooltip.setValue("This is my tooltip");
| Extends | Internal Rj.widget._Slider |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| min | Int | The minimum value that the slider can take. | 0 |
| max | Int | The maximum value that the slider can take. | 100 |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Inherited min | Int | The minimum value that the slider can take. | 0 |
| Inherited max | Int | The maximum value that the slider can take. | 100 |
| Inherited value | Int | The value at which the slider is set. | The min attribute. |
| Inherited step | Int | The smallest unit regarding how much the slider can move. | 1 |
| Inherited tooltip | Bool | Indicates whether the value of the slider is shown in a tooltip. | true |
| Inherited label | String | The text displayed next to the value, in the tooltip. | None |
| Inherited height | Int | The height of the slider. | 100 |
| Inherited width | Int | The width of the slider. | 100 |
| Inherited instantChange | Bool | If true, the slider value changes with every movement. Otherwise, it changes only when released. | false |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
| valuechanged | value | Event fired when the value of the widget changes. |
<div id='slider-widget' style='margin-top:100px;'></div>
var slider = new Rj.widget.HorizontalSlider("#slider-widget", 0, 10);
slider.addListener("hSliderListener", "valuechanged", function(value){
alert("The new value of the slider is:" + value);
})
| Extends | Internal Rj.widget._Slider |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| min | Int | The minimum value that the slider can take. | 0 |
| max | Int | The maximum value that the slider can take. | 100 |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Inherited min | Int | The minimum value that the slider can take. | 0 |
| Inherited max | Int | The maximum value that the slider can take. | 100 |
| Inherited value | Int | The value at which the slider is set. | The min attribute. |
| Inherited step | Int | The smallest unit regarding how much the slider can move. | 1 |
| Inherited tooltip | Bool | Indicates whether the value of the slider is shown in a tooltip. | true |
| Inherited label | String | The text displayed next to the value, in the tooltip. | None |
| Inherited height | Int | The height of the slider. | 100 |
| Inherited width | Int | The width of the slider. | 100 |
| Inherited instantChange | Bool | If true, the slider value changes with every movement. Otherwise, it changes only when released. | false |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
| valuechanged | value | Event fired when the value of the widget changes. |
<div id='slider-widget' style='margin-top: 100px;'></div>
var slider = new Rj.widget.VerticalSlider("#slider-widget", 0, 10);
slider.addListener("vSliderListener", "valuechanged", function(value){
alert("The new value of the slider is:" + value);
})
| Extends | Internal Rj.widget._InputWidget |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| min | Int | The minimum value that the knob can take. | 0 |
| max | Int | The maximum value that the knob can take. | 100 |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Inherited min | Int | The minimum value that the knob can take. | 0 |
| Inherited max | Int | The maximum value that the knob can take. | 100 |
| Inherited value | Int | The value at which the knob is set. | The min attribute. |
| snap | Int | The number of degrees at which the knob is drawn to the minimum value. | 1 |
| reverse | Bool | Indicates whether the value should decrease as the angle of the knob increases. | false |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
| valuechanged | value | Event fired when the value of the widget changes. |
<div id='knob-widget'></div>
var knob = new Rj.widget.Knob("#knob-widget", 0, 10);
knob.setValue(3);
| Extends | Internal Rj.widget._InputWidget |
| Implements | Inherited Rj.util.Bindable, Inherited Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| value | String | The initial string to be displayed in the text area. | None |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| Inherited selector | String | A valid css3/XPath selector where the widget will be displayed. | None |
| Inherited value | Int | The value at which the knob is set. | The min attribute. |
| rows | Int | The number of rows of the text area. | 5 |
| cols | Int | The number of columns of the text area. | 15 |
| label | String | The label of the text area. | None |
| submitText | String | The text displayed on the submit button. | "Submit" |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| beforerender | - | Event fired before the rendering of the widget starts. |
| afterrender | - | Event fired after the rendering of the widget ends. |
| valuechanged | value | Event fired when the value of the widget changes. |
<div id='text-widget'></div>
var textWidget = new Rj.widget.Text("#text-widget", "Initial text.");
textWidget.setValue("Another piece of text.");
| Extends | - |
| Implements | Internal Rj.query.LiteralQuery, Internal Rj.query.Executable, Rj.util.Bindable, Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| query | String | The query string. Can contain 0 or more variables. | None |
| Optional variables | Array | An array containing the names of the query variables. | [ ] |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| binaryFormat | Bool | Should be set to true if the query returns a binary format (e.g. image) instead of UTF-8 / ASCII format. | false |
| Inherited cached | Bool | Indicates whether the query should be cached or not. | false |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| Inherited evaluate | Void | Optional {Function} callback - a function to process the response Optional {Bool} persistent - if true the callback will be called each time the query will be re-executed |
Evaluates the query and calls a corresponding callback function. |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| evaluated | result | Event fired after the query has been evaluated. |
//set up the WCPS service
Rj.util.ConfigManager.setWCPSService({
url : "http://flanche.net:8080/petascope/",
queryParameter: "request"
});
var query = new Rj.query.WCPSQuery('for t1 in (mean_summer_airtemp) return encode (t1[ x(126), y(-10) ], "csv")');
query.evaluate(function(response){
alert("The query result is: " + response);
})
| Extends | - |
| Implements | Internal Rj.query.Executable, Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| coverageId | String | The id of the coverage. | None |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| coverageId | String | The id of the coverage. | None |
| subsets | Array of Rj.query.wcs.Subset | The requested subsets. | [ ] |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| Inherited evaluate | Void | Optional {Function} callback - a function to process the response Optional {Bool} persistent - if true the callback will be called each time the query will be re-executed |
Evaluates the query and calls a corresponding callback function. |
| addSubset | Void | {Rj.query.wcs.Subset} subset - the subset to be added | Adds a subset to the request. |
| removeSubset | Void | {Rj.query.wcs.Subset} subset - the subset to be removed | Removes a subset from the request. |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| evaluated | result | Event fired after the query has been evaluated. |
//set up the WCS service
Rj.util.ConfigManager.setWCSService({
baseUrl:"http://flanche.net:8080/petascope/",
name :"WCS",
version:"2.0.0"
});
var query = new Rj.query.wcs.GetCoverage("mean_summer_airtemp");
query.evaluate(function(response){
alert("The query result is: " + response);
});
| Extends | - |
| Implements | - |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| dimension | String | The name of the dimension. | None |
| crs | String | The identifier of the crs. | None |
| low | Int | The lower bound of the subset. | None |
| Optional high | Int | The higher bound of the subset. | None |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| dimension | String | The name of the dimension. | None |
| crs | String | The identifier of the crs. | None |
| low | Int | The lower bound of the subset. | None |
| Optional high | Int | The higher bound of the subset. | None |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| equals | Bool | {Rj.query.wcs.Subset} other - Another object of the same type. | Checks if the 2 objects have the same dimension, crs, low and high. |
| Extends | - |
| Implements | - |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| bind | Void | {Object} modifier - The object to which the binding is made. The binding implies that the modifier has effects on the original object. Optional variable - A variable indicating what the modifier will change. Optional callback - The binding function. If a default binindg exists, it will be overriden. | Performs the binding between objects. |
This example shows how to bind a query to a slider: when the slider moves the value of the query changes.
The query string is then printed to a text widget with a custom binder.
<div id='slider-widget' style='margin-top: 30px;'></div> <div id='text-widget'></div>
//set up the wcps service
Rj.util.ConfigManager.setWCPSService({
url : "http://flanche.net:8080/petascope/",
queryParameter: "request"
});
var slider = new Rj.widget.HorizontalSlider("#slider-widget", 126, 130);
var query = new Rj.query.WCPSQuery('for t1 in (mean_summer_airtemp) return encode (t1[ x(126:$x) ], "csv")', ['$x']);
query.bind(slider, '$x');
var text = new Rj.widget.Text("#text-widget");
text.bind(query, function(text, bind){
//set the initial value
text.setValue(query.toString());
//when the query evaluates, change to the new value
query.addListener('textModifier', 'evaluated', function(){
text.setValue(query.toString());
});
});
| Extends | - |
| Implements | - |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| WCPSService | Object | A configuration object for WCPS. | { url :"http://example.org/wcps/1.0/", queryParameter:"request" } |
| WCSService | Object | A configuration object for WCS. | { baseUrl:"http://example.org/", name :"WCS", version:"2.0.1" } |
| RequestDelay | Int | The minimal time, in ms, that has to pass from the the time of the last query until a new one can be sent. | 200 |
//set up a WCS service
Rj.util.ConfigManager.setWCSService({
baseUrl:"http://flanche.net:8080/petascope/",
name :"WCS",
version:"2.0.0"
});
| Extends | - |
| Implements | - |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| csvString | String | The original csv string. | None |
| Optional elementParser | Function | A function to be applied to every element of the parsed response. | None |
//set up a WCPS service
Rj.util.ConfigManager.setWCPSService({
url : "http://flanche.net:8080/petascope/",
queryParameter: "request"
});
var query = new Rj.query.WCPSQuery('for t2 in (mean_summer_airtemp) return encode (t2 [x(160), y(0)], "csv")');
query.evaluate(function(response){
var parser = new Rj.util.CSVParser(response, function(e){
return parseInt(e, 10);
});
alert(parser.toNativeJsArray());
});
| Extends | - |
| Implements | - |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| fireEvent | Void | {String} name - the name of the event to be fired Optional{Object} args - any additional parameters to be passed to the handler |
Fires an event with the given arguments. |
| addListener | Void | {String} identifier - an identifier for the registered listener {String} eventName - the name of the event to which the object listens {Function} callback - the function to be executed when the event occurs |
Registers a listener to a given event. |
| removeListener | Void | {String} identifier - the id of the listener to be removed {String} eventName - the name of the event associated with the listener |
Removes the given listener. |
<div id='slider-widget' style='margin-top:30px'></div> <div id='text-widget'></div>
var slider = new Rj.widget.HorizontalSlider("#slider-widget", 0, 50);
var text = new Rj.widget.Text("#text-widget");
//when the value of the slider changes, it fires "valuechanged"
//we make the value in the text change with a listener
slider.addListener("mySliderText", "valuechanged", function(value){
text.setValue(value);
});
| Extends | - |
| Implements | Rj.util.Observable |
| PARAMETER | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| series | Array | An array of the form [point, point, ...] or [[x,y], [x,y], ...]. | [ ] |
| NAME | TYPE | DESCRIPTION | DEFAULT |
|---|---|---|---|
| name | String | The name of the series. | None |
| color | String | The color of the series.. | None |
| series | Array | The series array in the form [[x,y], [x,y], ...] | None |
| NAME | RETURN TYPE | PARAMETERS | DESCRIPTION |
|---|---|---|---|
| pointAt | Float | {String} x - the index of the wanted point |
Returns the value of the point at the given index. |
| addPoint | Void | {Float} x - the index at which the point is added or the value of the point, if the second argument is not given. Optional {Float} y - the value of the point |
If x,y given it adds the point y to the coordinate x in the series. If only x given it adds it at the end of the series. If a point already exists at the given index, it is replaced. |
| removePoint | Void | {Int} x - the index of the point to be removed | Removes the given point. |
| NAME | PARAMETERS | DESCRIPTION |
|---|---|---|
| namechanged | newName | Event fired when the name of the series changes. |
| colorchanged | newColor | Event fired when the color of the series changes. |
| serieschanged | newSeries | Event fired when the series suffers any modifications. |
<div id='diagram-widget' style='margin-top:30px'></div>
var dataSeries = new Rj.util.DataSeries([[1,2], [5,9], [6,4]]);
var diagram = new Rj.widget.LinearDiagram("#diagram-widget", dataSeries);
//after 5 seconds change the color, and add a new point
setTimeout(function(){
dataSeries.setColor("green");
dataSeries.addPoint(7,5);
}, 5000);