OpenLayers.Layer.XYZ

The XYZ class is designed to make it easier for people who have tiles arranged by a standard XYZ grid.

Summary
OpenLayers.Layer.XYZThe XYZ class is designed to make it easier for people who have tiles arranged by a standard XYZ grid.
Properties
isBaseLayerDefault is true, as this is designed to be a base tile source.
sphericalMecatorWhether the tile extents should be set to the defaults for spherical mercator.
Constructor
OpenLayers.Layer.OSM
Functions
cloneCreate a clone of this layer
getUrl
addTileaddTile creates a tile, initializes it, and adds it to the layer div.
setMapWhen the layer is added to a map, then we can fetch our origin (if we don’t have one.)
OpenLayers.Layer.OSMA class to access OpenStreetMap tiles.

Properties

isBaseLayer

Default is true, as this is designed to be a base tile source.

sphericalMecator

Whether the tile extents should be set to the defaults for spherical mercator.  Useful for things like OpenStreetMap.  Default is false, except for the OSM subclass.

Constructor

OpenLayers.Layer.OSM

Parameters

name{String}
url{String}
options{Object} Hashtable of extra options to tag onto the layer

Functions

clone

clone: function (obj)

Create a clone of this layer

Parameters

obj{Object} Is this ever used?

Returns

{OpenLayers.Layer.Grid} An exact clone of this OpenLayers.Layer.Grid

getUrl

Parameters

bounds{OpenLayers.Bounds}

Returns

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

addTile

addTile:function(bounds,
position)

addTile creates a tile, initializes it, and adds it to the layer div.

Parameters

bounds{OpenLayers.Bounds}
position{OpenLayers.Pixel}

Returns

{OpenLayers.Tile.Image} The added OpenLayers.Tile.Image

setMap

setMap: function(map)

When the layer is added to a map, then we can fetch our origin (if we don’t have one.)

Parameters

map{OpenLayers.Map}

OpenLayers.Layer.OSM

A class to access OpenStreetMap tiles.  By default, uses the OpenStreetMap hosted tile.openstreetmap.org ‘Mapnik’ tileset.  If you wish to use tiles@home / osmarender layer instead, you can pass a layer like:

new OpenLayers.Layer.OSM("t@h",
  "http://tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png");

This layer defaults to Spherical Mercator.

clone: function (obj)
Create a clone of this layer
addTile:function(bounds,
position)
addTile creates a tile, initializes it, and adds it to the layer div.
setMap: function(map)
When the layer is added to a map, then we can fetch our origin (if we don’t have one.)
Base class for layers that use a lattice of tiles.
Instances of this class represent bounding boxes.
This class represents a screen coordinate, in x and y coordinates
Instances of OpenLayers.Tile.Image are used to manage the image tiles used by various layers.
Instances of OpenLayers.Map are interactive maps embedded in a web page.
Close