Monday, January 18, 2010

OpenLayers. Layer.WMS | Constructor

Create a new WMS layer object

Example

var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic",
                                   "http://wms.jpl.nasa.gov/wms.cgi",
                                   {layers: "modis,global_mosaic"});

Parameters

name
{String} A name for the layer
url
{String} Base url for the WMS (e.g.  http://wms.jpl.nasa.gov/wms.cgi)
params
{Object} An object with key/value pairs representing the GetMap query string parameters and parameter values.
options
{Ojbect} Hashtable of extra options to tag onto the layer

No comments:

Post a Comment