# OpenLayers.Layer.MapServer

Instances of OpenLayers.Layer.MapServer are used to display data from a MapServer CGI instance.

#### Inherits from

- OpenLayers.Layer.Grid

Summary

OpenLayers.Layer.MapServer | Instances of OpenLayers.Layer.MapServer are used to display data from a MapServer CGI instance.
Constants |
DEFAULT_PARAMS | {Object} Hashtable of default parameter key/value pairs
Constructor |
OpenLayers.Layer.MapServer | Create a new MapServer layer object
Functions |
clone | Create a clone of this layer
getURL | Return a query string for this layer
getFullRequestString | combine the layer’s url with its params and these newParams.

### Constants

### DEFAULT_PARAMS

{Object} Hashtable of default parameter key/value pairs

### Constructor

### OpenLayers.Layer.MapServer

Create a new MapServer layer object

#### Parameters

name | {String} A name for the layer
url | {String} Base url for the MapServer CGI (e.g. http://www2.dmsolutions.ca/cgi-bin/mapserv)
params | {Object} An object with key/value pairs representing the GetMap query string parameters and parameter values.
options | {Object} Hashtable of extra options to tag onto the layer

### Functions

### clone

> clone: function ( | obj | )

Create a clone of this layer

#### Returns

{OpenLayers.Layer.MapServer} An exact clone of this layer

### getURL

> getURL: function ( | bounds | )

Return a query string for this layer

#### Parameters

bounds | {OpenLayers.Bounds} A bounds representing the bbox for the request

#### Returns

{String} A string with the layer’s url and parameters and also the passed-in bounds and appropriate tile size specified as parameters.

### getFullRequestString

> getFullRequestString:function( | newParams,
> | altUrl | )

combine the layer’s url with its params and these newParams.

#### Parameters

newParams | {Object} New parameters that should be added to the request string.
altUrl | {String} (optional) Replace the URL in the full request string with the provided URL.

#### Returns

{String} A string with the layer’s url and parameters embedded in it.

> clone: function ( | obj | )

Create a clone of this layer

> getURL: function ( | bounds | )

Return a query string for this layer

> getFullRequestString:function( | newParams,
> | altUrl | )

combine the layer’s url with its params and these newParams.
Create a new MapServer layer object
Instances of this class represent bounding boxes.
Close