Classes
- Attribution
- Collection
- CollectionEvent
- DeviceOrientation
- Disposable
- DragBoxEvent
- Feature
- Geolocation
- Graticule
- Image
- ImageBase
- ImageTile
- Kinetic
- Map
- MapBrowserEvent
- MapEvent
- Object
- ObjectEvent
- Observable
- Overlay
- Sphere
- Tile
- VectorTile
- View
Namespaces
- animation
- color
- colorlike
- control
- coordinate
- easing
- events
- extent
- featureloader
- format
- geom
- has
- interaction
- layer
- loadingstrategy
- proj
- raster
- render
- source
- style
- tilegrid
Methods
-
ol.inherits(childCtor, parentCtor) experimental
src/ol/ol.js, line 264 -
Inherit the prototype methods from one constructor into another.
Usage:
function ParentClass(a, b) { } ParentClass.prototype.foo = function(a) { } function ChildClass(a, b, c) { // Call parent constructor ParentClass.call(this, a, b); } ol.inherits(ChildClass, ParentClass); var child = new ChildClass('a', 'b', 'see'); child.foo(); // This works.Name Type Description childCtorfunction Child constructor.
parentCtorfunction Parent constructor.
Type Definitions
-
ol.AttributionLike{string} {Array.<string>} {ol.Attribution} {Array.<ol.Attribution>} experimental
-
-
ol.CanvasFunctionType() experimental
src/ol/typedefs.js, line 59 -
A function returning the canvas element (
{HTMLCanvasElement}) used by the source as an image. The arguments passed to the function are:ol.Extentthe image extent,{number}the image resolution,{number}the device pixel ratio,ol.Sizethe image size, andol.proj.Projectionthe image projection. The canvas returned by this function is cached by the source. The this keyword inside the function references theol.source.ImageCanvas. -
ol.Color{Array.<number>} experimental
-
A color represented as a short array [red, green, blue, alpha]. red, green, and blue should be integers in the range 0..255 inclusive. alpha should be a float in the range 0..1 inclusive. If no alpha value is given then
1will be used. -
ol.ColorLike{string} {CanvasPattern} {CanvasGradient} experimental
-
A type accepted by CanvasRenderingContext2D.fillStyle. Represents a color, pattern, or gradient.
-
ol.Coordinate{Array.<number>}
-
An array of numbers representing an xy coordinate. Example:
[16, 48]. -
ol.CoordinateFormatType()
src/ol/typedefs.js, line 123 -
A function that takes a
ol.Coordinateand transforms it into a{string}. -
ol.Extent{Array.<number>}
-
An array of numbers representing an extent:
[minx, miny, maxx, maxy]. -
ol.FeatureLoader() experimental
src/ol/typedefs.js, line 149 -
ol.source.Vectorsources use a function of this type to load features.This function takes an
ol.Extentrepresenting the area to be loaded, a{number}representing the resolution (map units per pixel) and anol.proj.Projectionfor the projection as arguments.thiswithin the function is bound to theol.source.Vectorit's called from.The function is responsible for loading the features and adding them to the source.
-
ol.FeatureStyleFunction()
src/ol/typedefs.js, line 161 -
A function that returns an array of
stylesgiven a resolution. Thethiskeyword inside the function references theol.Featureto be styled. -
ol.FeatureUrlFunction() experimental
src/ol/typedefs.js, line 175 -
ol.source.Vectorsources use a function of this type to get the url to load features from.This function takes an
ol.Extentrepresenting the area to be loaded, a{number}representing the resolution (map units per pixel) and anol.proj.Projectionfor the projection as arguments and returns a{string}representing the URL. -
ol.ImageLoadFunctionType() experimental
src/ol/typedefs.js, line 206 -
A function that takes an
ol.Imagefor the image and a{string}for the src as arguments. It is supposed to make it so the underlying imageol.Image#getImageis assigned the content specified by the src. If not specified, the default isfunction(image, src) { image.getImage().src = src; }Providing a custom
imageLoadFunctioncan be useful to load images with post requests or - in general - through XHR requests, where the src of the image element would be set to a data URI when the content is loaded. -
ol.LoadingStrategy() experimental
src/ol/typedefs.js, line 243 -
One of
all,bbox,tile. -
ol.OverlayPositioning{string}
-
Overlay position:
'bottom-left','bottom-center','bottom-right','center-left','center-center','center-right','top-left','top-center','top-right' -
ol.Pixel{Array.<number>}
-
An array with two elements, representing a pixel. The first element is the x-coordinate, the second the y-coordinate of the pixel.
-
ol.PreRenderFunction() experimental
src/ol/typedefs.js, line 291 -
Function to perform manipulations before rendering. This function is called with the
ol.Mapas first and an optionalolx.FrameStateas second argument. Returntrueto keep this function for the next frame,falseto remove it. -
ol.RendererType{string}
-
Available renderers:
'canvas','dom'or'webgl'. -
ol.Size{Array.<number>}
-
An array of numbers representing a size:
[width, height]. -
ol.TileCoord{Array.<number>} experimental
-
An array of three numbers representing the location of a tile in a tile grid. The order is
z,x, andy.zis the zoom level. -
ol.TileLoadFunctionType() experimental
src/ol/typedefs.js, line 414 -
A function that takes an
ol.Tilefor the tile and a{string}for the url as arguments. -
ol.TileUrlFunctionType() experimental
src/ol/typedefs.js, line 449 -
ol.source.Tilesources use a function of this type to get the url that provides a tile for a given tile coordinate.This function takes an
ol.TileCoordfor the tile coordinate, a{number}representing the pixel ratio and anol.proj.Projectionfor the projection as arguments and returns a{string}representing the tile URL, or undefined if no tile should be requested for the passed tile coordinate. -
ol.TransformFunction()
src/ol/typedefs.js, line 461 -
A transform function accepts an array of input coordinate values, an optional output array, and an optional dimension (default should be 2). The function transforms the input coordinate values, populates the output array, and returns the output array.
-
ol.WFSFeatureCollectionMetadata{Object}
-
Number of features; bounds/extent.
-
ol.WFSTransactionResponse{Object}
-
Total deleted; total inserted; total updated; array of insert ids.
OpenLayers 3