oscar.debug

Summary
oscar.debug
oscar.Util
Functions
buildUrl This method takes a string and object of parameters andreturns a url with query string.
extractGeometriesFromFeatures This method takes an array offeatures and extracts the geometry objects from them and returns them in an array.
combineGeometries This method take an array of<OpenLayers.Geometry> objects and attempts to combine them to fewer geometry objects.
mergeGeometries Takes two <OpenLayers.Geometry> objects and mergesthem to a single <OpenLayers.Geometry> object.
mergeToExistingGeometry Takes a geometry and attempts to merge itto a list of existing geometry objects.
isFeatureInArray Returns true of a feature name is found in the
checkAllChecks all checkboxes in a form except a checkbox using the name “allbox”
isOneCheckedTakes an array of checkbox elements and checks to see if at least one is checked.
isSphericalMercatorReturns true if the coordinate system is EPSG:3857 or EPSG:900913
moveSelectedOptionsMoves selected options from one select box to another
moveAllSelectOptionsMoves all options from one select box to another
getBrowserNameReturns: {String} A string which specifies which is the current browser in which we are running.
buildWFSFilterForRequestThis method will generate a WFSFilter for WFS requests.
getDataFormatterreturns a data formatter for the passed-in data format
oscar.Util.EpsgConversionConverts epsg codes to urns and vice versa
Functions
oscar.Util.EpsgConversion.urnToEpsgConvert urn to crs.
oscar.Util.EpsgConversion.epsgToUrnConvert espg crs to urn.
oscar.Util.getServerGeometryPropertyNamereturns the geometry property name of the current server
oscar.alertDisplays an alert dialog box to the user.
oscar.confirmDisplays an confirm dialog box.
getGridOffsets Returns the correct offsets from a WCSDescribeCoverage operation
isGeographicCRS Returns true / false if a CRS is geographic.  Iffalse then the CRS is assumed to be projected
boundsToFeature This method taks an OpenLayers.Bounds object and
oscar.Util.renderEntities Takes a string and renders the character

oscar.Util

Summary
Functions
buildUrl This method takes a string and object of parameters andreturns a url with query string.
extractGeometriesFromFeatures This method takes an array offeatures and extracts the geometry objects from them and returns them in an array.
combineGeometries This method take an array of<OpenLayers.Geometry> objects and attempts to combine them to fewer geometry objects.
mergeGeometries Takes two <OpenLayers.Geometry> objects and mergesthem to a single <OpenLayers.Geometry> object.
mergeToExistingGeometry Takes a geometry and attempts to merge itto a list of existing geometry objects.
isFeatureInArray Returns true of a feature name is found in the
checkAllChecks all checkboxes in a form except a checkbox using the name “allbox”
isOneCheckedTakes an array of checkbox elements and checks to see if at least one is checked.
isSphericalMercatorReturns true if the coordinate system is EPSG:3857 or EPSG:900913
moveSelectedOptionsMoves selected options from one select box to another
moveAllSelectOptionsMoves all options from one select box to another
getBrowserNameReturns: {String} A string which specifies which is the current browser in which we are running.
buildWFSFilterForRequestThis method will generate a WFSFilter for WFS requests.
getDataFormatterreturns a data formatter for the passed-in data format

Functions

buildUrl This method takes a string and object of parameters and

returns a url with query string.

extractGeometriesFromFeatures This method takes an array of

features and extracts the geometry objects from them and returns them in an array.

Returns an array of geometries.

combineGeometries This method take an array of

<OpenLayers.Geometry> objects and attempts to combine them to fewer geometry objects.

Returns an array of geometry objects.

mergeGeometries Takes two <OpenLayers.Geometry> objects and merges

them to a single <OpenLayers.Geometry> object.

Returns the new geometry object.

mergeToExistingGeometry Takes a geometry and attempts to merge it

to a list of existing geometry objects.  Returns true or false of the merge was successful.

isFeatureInArray Returns true of a feature name is found in the

array Parameters:featureName {String} - selectedFeatures - array of feature names {String}

checkAll

oscar.Util.checkAll = function(theForm)

Checks all checkboxes in a form except a checkbox using the name “allbox”

isOneChecked

oscar.Util.isOneChecked = function(checkbox)

Takes an array of checkbox elements and checks to see if at least one is checked.

isSphericalMercator

oscar.Util.isSphericalMercator = function(srs)

Returns true if the coordinate system is EPSG:3857 or EPSG:900913

Parameters

srs{String} A coordiante system reference such as “EPSG:4326” or “EPSG:3857”

moveSelectedOptions

oscar.Util.moveSelectedOptions = function(fromSelectName,
toSelectName)

Moves selected options from one select box to another

Parameters

fromSelectName{String} Source select reference
toSelectName{String} destination select reference

moveAllSelectOptions

oscar.Util.moveAllSelectOptions = function(fromSelectName,
toSelectName)

Moves all options from one select box to another

Parameters

fromSelectName{String} Source select reference
toSelectName{String} destination select reference

getBrowserName

oscar.Util.getBrowserName = function()

Returns: {String} A string which specifies which is the current browser in which we are running.

Currently-supported browser detection and codes: * ‘opera’ -- Opera * ‘msie’ -- Internet Explorer * ‘safari’ -- Safari * ‘firefox’ -- FireFox * ‘mozilla’ -- Mozilla

If we are unable to property identify the browser, we return an empty string.

buildWFSFilterForRequest

oscar.Util.buildWFSFilterForRequest = function(geometry,
srs,
wfsVersion,
propertyName)

This method will generate a WFSFilter for WFS requests. geometry - OpenLayers.LonLat || OpenLayers.Bounds

returns a WFSFilter

getDataFormatter

oscar.Util.getDataFormatter = function(dataFormatType,
options)

returns a data formatter for the passed-in data format

Parameters

dataFormatTypeType of the data format options - An optional object whose properties will be set on this instance

oscar.Util.EpsgConversion

Converts epsg codes to urns and vice versa

Functions

oscar.Util.EpsgConversion.urnToEpsg

Convert urn to crs.

Parameters

urn{String} academic urn

Returns

epsg{String} epsg crs.

Usage: > var epsg = oscar.Util.EpsgConversion.urnToEpsg(“urn:ogc:def:crs:EPSG::4326”); > > Returns “EPSG:4326”

oscar.Util.EpsgConversion.epsgToUrn

Convert espg crs to urn.

Parameters

epsg{String}

Returns

urn{String} academic urn

Usage: > var urn = oscar.Util.EpsgConversion.epsgToUrn(“EPSG:4326”); > > Returns “urn:ogc:def:crs:EPSG::4326”

oscar.Util.getServerGeometryPropertyName

oscar.Util.getServerGeometryPropertyName = function(schema)

returns the geometry property name of the current server

Parameters: schema{JSON} the DescribeFeatureType schema of current server

Returns: {String} Returns server GeometryPropertyName as a String.

oscar.alert

oscar.alert = function(props,
content,
callbacks)

Displays an alert dialog box to the user.

oscar.confirm

oscar.confirm = function(props,
content,
callbacks)

Displays an confirm dialog box.

getGridOffsets Returns the correct offsets from a WCS

DescribeCoverage operation

isGeographicCRS Returns true / false if a CRS is geographic.  If

false then the CRS is assumed to be projected

boundsToFeature This method taks an OpenLayers.Bounds object and

convert it to a feature.  Parameters:bounds <OpenLayers.Bounds> -
srcProjection <OpenLayers.Projection>map <OpenLayers.Map>

oscar.Util.renderEntities Takes a string and renders the character

entities.  Parameters:str String object.  Returns: Rendered entity string
oscar.Util.checkAll = function(theForm)
Checks all checkboxes in a form except a checkbox using the name “allbox”
oscar.Util.isOneChecked = function(checkbox)
Takes an array of checkbox elements and checks to see if at least one is checked.
oscar.Util.isSphericalMercator = function(srs)
Returns true if the coordinate system is EPSG:3857 or EPSG:900913
oscar.Util.moveSelectedOptions = function(fromSelectName,
toSelectName)
Moves selected options from one select box to another
oscar.Util.moveAllSelectOptions = function(fromSelectName,
toSelectName)
Moves all options from one select box to another
oscar.Util.getBrowserName = function()
Returns: {String} A string which specifies which is the current browser in which we are running.
oscar.Util.buildWFSFilterForRequest = function(geometry,
srs,
wfsVersion,
propertyName)
This method will generate a WFSFilter for WFS requests.
oscar.Util.getDataFormatter = function(dataFormatType,
options)
returns a data formatter for the passed-in data format
oscar.Util.getServerGeometryPropertyName = function(schema)
returns the geometry property name of the current server
oscar.alert = function(props,
content,
callbacks)
Displays an alert dialog box to the user.
oscar.confirm = function(props,
content,
callbacks)
Displays an confirm dialog box.