HSLayers.Util (data)

HSLayers.Util

HSLayers.Util

HSLayers.Util do contain set of tools, which can be useful. For programing.

Methods

usable for {OpenLayers.Map}

HSLayers.Util.getProjectionOptions(projection, min, max)
Return some options, like resolution etc. for specified projection,

usable for {OpenLayers.Map}

param String projection:
 projection such as “epsg:102067”
param Integer min:
 minimum scale (20 000 000 default)
param Integer max:
 maximum scale (500 default)
returns:with parameters for OpenLayers.Map
rtype:Object
HSLayers.Util.getCookie(c_name)

Return cookie value for given cookie name

Arguments:
  • c_name (String) – name of the cookie
Returns:

value of the cookie or empty string

Return type:

String

HSLayers.Util.geoMicroformatParser(elem, source, target)

Geo microformat parser - parser for “geo” microformat for “span” tags

Arguments:
  • elem (DOMObject) – element, in which the parser should look after
  • source (String) – projection
  • target (String) – projection
Returns:

resulting vector feature

Return type:

OpenLayers.Feature.Vector

HSLayers.Util.geoNamesParser(XMLDOM, extent)

Geonames parser

Arguments:
  • XMLDOM (DOMElement) – xml document in DOM form
  • projection=map.getProjection() (String) – target projection
  • extent
Returns:

resulting vector feature

Return type:

OpenLayers.Feature.Vector

HSLayers.Util.getBaseLayer(sphericalMercator, extent, {Float}, {Float})

Create base layer OpenLayers.Layer.Image with specified attributes.

Arguments:
  • sphericalMercator (Boolean) –
  • extent (OpenLayers.Bounds) –
  • {Float}

    resolutions

    Optional

  • {Float}

    scaels

    Optional

Returns:

base layer

Return type:

[OpenLayers.Layer]

HSLayers.Util.getIsoDate(time)

get iso format of date object

Arguments:
  • time (Date) –
Returns:

time string in ISO format

Return type:

String

HSLayers.Util.addAnchors(url)

replace http://.... text with <a> links

Arguments:
Returns:

Return type:

String

HSLayers.Util.feedback(data, filename)

Send data to server and obtain URL for later usage

Arguments:
  • data
  • filename
HSLayers.Util.degreeToLonLat(str)

Parses deegree string to standard decimal number

Arguments:
  • str – {String} “N 50° 51.858 E 015° 04.457” or “S 015° 04.457”
HSLayers.Util.msg(title, msg, target, direction)

display mesage or help

Arguments:
  • title – {String}
  • msg – {String}
  • target – {String} element id
  • direction – {String} t,b, ... default: t

Main Menu


Table Of Contents

Previous topic

HSLayers.SOS.ObservationTablePanel (class)

Next topic

HSLayers.WMCManager (class)

This Page