Project

General

Profile

1 3032 perry
OpenLayers.Layer.Grid
2
3
The Grid layer is the base layer for almost all image layers. This is a subclass of HTTPRequest.
4
5
* Constructor
6
  OpenLayers.Layer.Grid(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.
7
8
* Methods
9
  getGridBounds() -- {OpenLayers.Bounds} -- return geographic extent of the grid of tiles.
10
  _initTiles() -- none -- Used to initialize the tile grid, creating image elements as neccesary and filling them with the correct images.
11
  spiralTileLoad() -- none -- Called from _initTiles. Rotates through the grid filling in the images for the grid.
12
  clone() -- {OpenLayers.Layer.Grid} -- create a clone of the layer. Subclassed from {OpenLayers.Layer}.
13
  setMap(map) -- none -- Set the map property of the layer. Also set the parameters which are inherited from the map. This is also where the tileSize is retrieved from the map. Subclassed from {OpenLayers.Layer}.
14
  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. Subclassed from {OpenLayers.Layer}.
15
  getResolution() -- {float} -- Return the current resolution of the map, in units/pixel. Subclassed from {OpenLayers.Layer}.
16
  getExtent() -- {OpenLayers.Bounds} -- Return the geographic extent of the current map viewport. Subclassed from {OpenLayers.Layer}.
17
  getZoomForExtent({OpenLayers.Bounds|bounds}) -- {Integer} -- return the integer zoom which most closely matches the passed bounds. Subclassed from {OpenLayers.Layer}.
18
  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 layer. Subclassed from {OpenLayers.Layer}.
19
  getViewPortPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels. Subclassed from {OpenLayers.Layer}.
20
21
* Parameters
22
  buffer -- Default 2. Number of tiles around the central map area which OpenLayers will preload so that dragging goes more smoothly.
23
  * Subclassed from OpenLayers.Layer
24
  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.
25
  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.
26
  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.
27
  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.
28
  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.
29
  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.
30
  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.
31
  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.