Version : 0.2
Last Change : 2003-06-25
File Name : WMSlayer.js
layerWMS Image-type class that makes a single request and OGC WMS server with one or more layers.
create method: function layerWMS(parent, url, layer, caption, version)
Creates the layerWMS class that defines the WMS layer properties and methods according to the OpenGIS specification,
where the parameters are:
- parent - class defining the control where the layer will be integrated can be null or an instant of mapWMS and its descendents
- url - server url (without the http)
- layer - layer name or names
- caption - optional parameter for future use on legends and display box
- version - optional parameter defining the wms version (default value is "1.1")
Methods
- url = function (BBox)
returns the OGC WMS compliant url for this request.
The BBox is optional parameter. When null and this class parent is a mapWMS (or any of its descendents)
his own BBox value will be used
- writeDOM = function (name, left, top, width, height, style)
Writes the necessary DHTML for this class (to-do still needs implement the style tag)
- refresh = function (BBox)
Updates the image HTML element with a new request (updating any changes made to the class)
- show = function () - not fully implemented
- hide = function () - not fully implemented
- isVisible = function () - not fully implemented
Properties
- parent : class defining the control where the layer will be integrated can be null or an instant of mapWMS and its descendents
- srs : defines the spatial reference system of the request (default value is "EPSG:4326" or the parent's value if different than null)
- wmsUrl : Url of the server (without the http)
- wmsLayers : string defining the layer name or names;
- caption : caption;
- format : (default value is "GIF")
- opacity : not fully implemented
- styles : string defining the layer(s) style(s) (default value is "")
- additionalParam : additional or vendor specific parameters to add to the url (default value is "")
- visible : boolean value defining the objects visibility (default value is "true")
- version : WMS version to be used to this request
- request : string that defines the url parameters of the WMS that are version-dependent (e.g. WMTVER and REQUEST)
- DOMref : reference to the image DOM object that is created on the writeDOM method.
Events
- onError = function ( wmsLayer ) : event launched when a http connection error occurs
Examples
- single layer request example [view]
Change Log
|