OpenLayers.Layer Layers are the most important and central aspect of OpenLayers. They are the core functionality for the software: Everything that ends up on the map comes from a layer. The base layer class is designed to be subclassed by any number of different layers. * Constructor OpenLayers.Layer(name, options) -- All layers have a name as their first param. This name is used to display the layer in the LayerSwitcher, and for other purposes. The options parameter is used to replace any parameters of the Layer which need to be different. * Methods clone() -- {OpenLayers.Layer} -- create a clone of the layer. setName({String|name}) -- none -- Set the name of the layer to something different. moveTo({OpenLayers.Bounds|bounds}, {Boolean|zoomChanged}) -- none -- Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location. setMap(map) -- none -- Set the map property of the layer. Also set the parameters which are inherited from the map. getVisibility() -- {Boolean} -- Return true or false based on visibility of the layer. setVisibility({Boolean|visible}) -- none -- Set the layer visibility, and trigger the appropriate events. getResolution() -- {float} -- Return the current resolution of the map, in units/pixel. getExtent() -- {OpenLayers.Bounds} -- Return the geographic extent of the current map viewport. getZoomForExtent({OpenLayers.Bounds|bounds}) -- {Integer} -- return the integer zoom which most closely matches the passed bounds. getLonLatFromViewPortPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the laye getViewPortPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels addOptions({options})) -- none -- Change the options on the layer. This is the supported way to change properties of the layer. * Parameters displayOutsideMaxExtent -- Determine whether images or data are loaded outside the maxExtent. Default is false. isBaseLayer -- This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false. projection -- SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. maxExtent -- an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. maxResolution -- The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map. maxZoomLevel -- The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. minScale -- The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map. maxScale -- The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map. units -- The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map.