Instances of OpenLayers.Layer.WMS are used to display data from OGC Web Mapping Services. Create a new WMS layer with the OpenLayers.Layer.WMS constructor.
| OpenLayers. Layer.WMS | Instances of OpenLayers.Layer.WMS are used to display data from OGC Web Mapping Services. |
| Constants | |
| DEFAULT_PARAMS | {Object} Hashtable of default parameter key/value pairs |
| Properties | |
| isBaseLayer | {Boolean} Default is true for WMS layer |
| encodeBBOX | {Boolean} Should the BBOX commas be encoded? |
| Constructor | |
| OpenLayers. Layer.WMS | Create a new WMS layer object |
| Functions | |
| mergeNewParams | Catch changeParams and uppercase the new params to be merged in before calling changeParams on the super class. |
Create a new WMS layer object
var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi",
{layers: "modis,global_mosaic"});| 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 |
Catch changeParams and uppercase the new params to be merged in before calling changeParams on the super class.
mergeNewParams:function( newParams )