Type Definitions
-
olx.source.BingMapsOptions{Object} experimental
-
Properties:
Name Type Argument Description culture
string | undefined <optional>
Culture code. Default is
en-us
.key
string Bing Maps API key. Get yours at http://bingmapsportal.com/.
imagerySet
string Type of imagery.
maxZoom
number | undefined <optional>
Max zoom. Default is what's advertized by the BingMaps service (
21
currently).tileLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load a tile given a URL.
wrapX
boolean | undefined <optional>
Whether to wrap the world horizontally. Default is
true
. -
olx.source.ClusterOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
distance
number | undefined <optional>
Minimum distance in pixels between clusters. Default is
20
.extent
ol.Extent | undefined <optional>
Extent.
format
ol.format.Feature | undefined <optional>
Format.
logo
string | undefined <optional>
Logo.
projection
ol.proj.ProjectionLike Projection.
source
ol.source.Vector Source.
-
olx.source.ImageCanvasOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
canvasFunction
ol.CanvasFunctionType Canvas function. The function returning the canvas element used by the source as an image. The arguments passed to the function are:
{ol.Extent}
the image extent,{number}
the image resolution,{number}
the device pixel ratio,{ol.Size}
the image size, and{ol.proj.Projection}
the image projection. The canvas returned by this function is cached by the source. If the value returned by the function is later changed thendispatchChangeEvent
should be called on the source for the source to invalidate the current cached image.logo
string | olx.LogoOptions | undefined <optional>
Logo.
projection
ol.proj.ProjectionLike Projection.
ratio
number | undefined <optional>
Ratio. 1 means canvases are the size of the map viewport, 2 means twice the size of the map viewport, and so on. Default is
1.5
.resolutions
Array.<number> | undefined <optional>
Resolutions. If specified, new canvases will be created for these resolutions only.
state
ol.source.State | string | undefined <optional>
Source state.
-
olx.source.ImageMapGuideOptions{Object} experimental
-
Properties:
Name Type Argument Description url
string | undefined <optional>
The mapagent url.
displayDpi
number | undefined <optional>
The display resolution. Default is
96
.metersPerUnit
number | undefined <optional>
The meters-per-unit value. Default is
1
.hidpi
boolean | undefined <optional>
Use the
ol.Map#pixelRatio
value when requesting the image from the remote server. Default istrue
.useOverlay
boolean | undefined <optional>
If
true
, will useGETDYNAMICMAPOVERLAYIMAGE
.projection
ol.proj.ProjectionLike Projection.
ratio
number | undefined <optional>
Ratio.
1
means image requests are the size of the map viewport,2
means twice the size of the map viewport, and so on. Default is1
.resolutions
Array.<number> | undefined <optional>
Resolutions. If specified, requests will be made for these resolutions only.
imageLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load an image given a URL.
params
Object | undefined <optional>
Additional parameters.
-
olx.source.ImageStaticOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
crossOrigin
null | string | undefined <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.imageExtent
ol.Extent Extent of the image in map coordinates. This is the [left, bottom, right, top] map coordinates of your image.
imageSize
ol.Size | undefined <optional>
Size of the image in pixels.
imageLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load an image given a URL.
logo
string | olx.LogoOptions | undefined <optional>
Optional logo.
projection
ol.proj.ProjectionLike Projection.
url
string Image URL.
-
olx.source.ImageVectorOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
logo
string | olx.LogoOptions | undefined <optional>
Logo.
projection
ol.proj.ProjectionLike Projection.
ratio
number | undefined <optional>
Ratio. 1 means canvases are the size of the map viewport, 2 means twice the size of the map viewport, and so on. Default is
1.5
.resolutions
Array.<number> | undefined <optional>
Resolutions. If specified, new canvases will be created for these resolutions only.
source
ol.source.Vector The vector source from which the vector features drawn in canvas elements are read.
style
ol.style.Style | Array.<ol.style.Style> | ol.style.StyleFunction | undefined <optional>
Style to use when rendering features to the canvas.
-
olx.source.ImageWMSOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
crossOrigin
null | string | undefined <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.hidpi
boolean | undefined <optional>
Use the
ol.Map#pixelRatio
value when requesting the image from the remote server. Default istrue
.serverType
ol.source.wms.ServerType | string | undefined <optional>
The type of the remote WMS server:
mapserver
,geoserver
orqgis
. Only needed ifhidpi
istrue
. Default isundefined
.imageLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load an image given a URL.
logo
string | olx.LogoOptions | undefined <optional>
Logo.
params
Object.<string, *> WMS request parameters. At least a
LAYERS
param is required.STYLES
is''
by default.VERSION
is1.3.0
by default.WIDTH
,HEIGHT
,BBOX
andCRS
(SRS
for WMS version < 1.3.0) will be set dynamically.projection
ol.proj.ProjectionLike Projection.
ratio
number | undefined <optional>
Ratio.
1
means image requests are the size of the map viewport,2
means twice the size of the map viewport, and so on. Default is1.5
.resolutions
Array.<number> | undefined <optional>
Resolutions. If specified, requests will be made for these resolutions only.
url
string | undefined <optional>
WMS service URL.
-
olx.source.MapQuestOptions{Object} experimental
-
Properties:
Name Type Argument Description layer
string Layer. Possible values are
osm
,sat
, andhyb
.tileLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load a tile given a URL.
url
string | undefined <optional>
URL template. Must include
{x}
,{y}
or{-y}
, and{z}
placeholders. -
olx.source.OSMOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
crossOrigin
null | string | undefined <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.Default is
anonymous
.maxZoom
number | undefined <optional>
Max zoom. Default is
19
.tileLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load a tile given a URL.
url
string | undefined <optional>
URL template. Must include
{x}
,{y}
or{-y}
, and{z}
placeholders. Default is//{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png
.wrapX
boolean | undefined <optional>
Whether to wrap the world horizontally. Default is
true
. -
olx.source.StamenOptions{Object} experimental
-
Properties:
Name Type Argument Description layer
string Layer.
minZoom
number | undefined <optional>
Minimum zoom.
maxZoom
number | undefined <optional>
Maximum zoom.
opaque
boolean | undefined <optional>
Whether the layer is opaque.
tileLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load a tile given a URL.
url
string | undefined <optional>
URL template. Must include
{x}
,{y}
or{-y}
, and{z}
placeholders. -
olx.source.TileArcGISRestOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
params
Object.<string, *> | undefined <optional>
ArcGIS Rest parameters. This field is optional. Service defaults will be used for any fields not specified.
FORMAT
isPNG32
by default.F
isIMAGE
by default.TRANSPARENT
istrue
by default.BBOX,
SIZE,
BBOXSR, and
IMAGESRwill be set dynamically. Set
LAYERS` to override the default service layer visibility. See http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/ for further reference.logo
string | olx.LogoOptions | undefined <optional>
Logo.
tileGrid
ol.tilegrid.TileGrid | undefined <optional>
Tile grid. Base this on the resolutions, tilesize and extent supported by the server. If this is not defined, a default grid will be used: if there is a projection extent, the grid will be based on that; if not, a grid based on a global extent with origin at 0,0 will be used.
projection
ol.proj.ProjectionLike Projection.
tileLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load a tile given a URL.
url
string | undefined <optional>
ArcGIS Rest service URL for a Map Service or Image Service. The url should include /MapServer or /ImageServer.
wrapX
boolean | undefined <optional>
Whether to wrap the world horizontally. Default is
true
.urls
Array.<string> | undefined <optional>
ArcGIS Rest service urls. Use this instead of
url
when the ArcGIS Service supports multiple urls for export requests. -
olx.source.TileDebugOptions{Object} experimental
-
Properties:
Name Type Argument Description projection
ol.proj.ProjectionLike Projection.
tileGrid
ol.tilegrid.TileGrid | undefined <optional>
Tile grid.
-
olx.source.TileImageOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
crossOrigin
null | string | undefined <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.logo
string | olx.LogoOptions | undefined <optional>
Logo.
opaque
boolean | undefined <optional>
Whether the layer is opaque.
projection
ol.proj.ProjectionLike Projection.
state
ol.source.State | string | undefined <optional>
Source state.
tileClass
function | undefined <optional>
Class used to instantiate image tiles. Default is
ol.ImageTile
.tileGrid
ol.tilegrid.TileGrid | undefined <optional>
Tile grid.
tileLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load a tile given a URL.
tilePixelRatio
number | undefined <optional>
The pixel ratio used by the tile service. For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px by 512px images (for retina/hidpi devices) then
tilePixelRatio
should be set to2
. Default is1
.tileUrlFunction
ol.TileUrlFunctionType | undefined <optional>
Optional function to get tile URL given a tile coordinate and the projection.
wrapX
boolean | undefined <optional>
Whether to wrap the world horizontally. The default,
undefined
, is to request out-of-bounds tiles from the server. When set tofalse
, only one world will be rendered. When set totrue
, tiles will be requested for one world only, but they will be wrapped horizontally to render multiple worlds. -
olx.source.TileJSONOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Optional attributions for the source. If provided, these will be used instead of any attribution data advertised by the server. If not provided, any attributions advertised by the server will be used.
crossOrigin
null | string | undefined <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.tileLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load a tile given a URL.
url
string URL to the TileJSON file.
wrapX
boolean | undefined <optional>
Whether to wrap the world horizontally. Default is
true
. -
olx.source.TileUTFGridOptions{Object} experimental
-
Properties:
Name Type Argument Description preemptive
boolean | undefined <optional>
If
true
the TileUTFGrid source loads the tiles based on their "visibility". This improves the speed of response, but increases traffic. Note that if set tofalse
, you need to passtrue
asopt_request
to theforDataAtCoordinateAndResolution
method otherwise no data will ever be loaded. Default istrue
.url
string -
olx.source.TileVectorOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
format
ol.format.Feature Format.
logo
string | olx.LogoOptions | undefined <optional>
Logo.
tileGrid
ol.tilegrid.TileGrid Tile grid.
tileUrlFunction
ol.TileUrlFunctionType | undefined <optional>
Optional function to get tile URL given a tile coordinate and the projection. Required if url or urls are not provided.
url
string | undefined <optional>
URL template. Must include
{x}
,{y}
or{-y}
, and{z}
placeholders.urls
Array.<string> | undefined <optional>
An array of URL templates.
-
olx.source.TileWMSOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
params
Object.<string, *> WMS request parameters. At least a
LAYERS
param is required.STYLES
is''
by default.VERSION
is1.3.0
by default.WIDTH
,HEIGHT
,BBOX
andCRS
(SRS
for WMS version < 1.3.0) will be set dynamically.crossOrigin
null | string | undefined <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.gutter
number | undefined <optional>
The size in pixels of the gutter around image tiles to ignore. By setting this property to a non-zero value, images will be requested that are wider and taller than the tile size by a value of
2 x gutter
. Defaults to zero. Using a non-zero value allows artifacts of rendering at tile edges to be ignored. If you control the WMS service it is recommended to address "artifacts at tile edges" issues by properly configuring the WMS service. For example, MapServer has atile_map_edge_buffer
configuration parameter for this. See http://mapserver.org/output/tile_mode.html.hidpi
boolean | undefined <optional>
Use the
ol.Map#pixelRatio
value when requesting the image from the remote server. Default istrue
.logo
string | olx.LogoOptions | undefined <optional>
Logo.
tileGrid
ol.tilegrid.TileGrid | undefined <optional>
Tile grid. Base this on the resolutions, tilesize and extent supported by the server. If this is not defined, a default grid will be used: if there is a projection extent, the grid will be based on that; if not, a grid based on a global extent with origin at 0,0 will be used.
maxZoom
number | undefined <optional>
Maximum zoom.
projection
ol.proj.ProjectionLike Projection.
serverType
ol.source.wms.ServerType | string | undefined <optional>
The type of the remote WMS server. Currently only used when
hidpi
istrue
. Default isundefined
.tileLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load a tile given a URL.
url
string | undefined <optional>
WMS service URL.
urls
Array.<string> | undefined <optional>
WMS service urls. Use this instead of
url
when the WMS supports multiple urls for GetMap requests.wrapX
boolean | undefined <optional>
Whether to wrap the world horizontally. When set to
false
, only one world will be rendered. Whentrue
, tiles will be requested for one world only, but they will be wrapped horizontally to render multiple worlds. The default istrue
. -
olx.source.VectorOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
features
Array.<ol.Feature> | undefined <optional>
Features.
format
ol.format.Feature | undefined <optional>
The feature format used by the XHR feature loader when
url
is set. Required ifurl
is set, otherwise ignored. Default isundefined
.loader
ol.FeatureLoader | undefined <optional>
The loader function used to load features, from a remote source for example. Note that the source will create and use an XHR feature loader when
url
is set.logo
string | olx.LogoOptions | undefined <optional>
Logo.
strategy
ol.LoadingStrategy | undefined <optional>
The loading strategy to use. By default an
ol.loadingstrategy.all
strategy is used, a one-off strategy which loads all features at once.url
string | undefined <optional>
Setting this option instructs the source to use an XHR loader (see
ol.featureloader.xhr
) and anol.loadingstrategy.all
for a one-off download of all features from that URL. Requiresformat
to be set as well.wrapX
boolean | undefined <optional>
Wrap the world horizontally. Default is
true
. For vector editing across the -180° and 180° meridians to work properly, this should be set tofalse
. The resulting geometry coordinates will then exceed the world bounds. -
olx.source.WMTSOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
crossOrigin
string | null | undefined <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.logo
string | olx.LogoOptions | undefined <optional>
Logo.
tileGrid
ol.tilegrid.WMTS Tile grid.
projection
ol.proj.ProjectionLike Projection.
requestEncoding
ol.source.WMTSRequestEncoding | string | undefined <optional>
Request encoding. Default is
KVP
.layer
string Layer name as advertised in the WMTS capabilities.
style
string Style name as advertised in the WMTS capabilities.
tileClass
function | undefined <optional>
Class used to instantiate image tiles. Default is
ol.ImageTile
.tilePixelRatio
number | undefined <optional>
The pixel ratio used by the tile service. For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px by 512px images (for retina/hidpi devices) then
tilePixelRatio
should be set to2
. Default is1
.version
string | undefined <optional>
WMTS version. Default is
1.0.0
.format
string | undefined <optional>
Image format. Default is
image/jpeg
.matrixSet
string Matrix set.
dimensions
Object | undefined <optional>
Additional "dimensions" for tile requests. This is an object with properties named like the advertised WMTS dimensions.
url
string | undefined <optional>
A URL for the service. For the RESTful request encoding, this is a URL template. For KVP encoding, it is normal URL.
maxZoom
number | undefined <optional>
Maximum zoom.
tileLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load a tile given a URL.
urls
Array.<string> | undefined <optional>
An array of URLs. Requests will be distributed among the URLs in this array.
wrapX
boolean | undefined <optional>
Whether to wrap the world horizontally. Default is
false
. -
olx.source.XYZOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
crossOrigin
null | string | undefined <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.logo
string | olx.LogoOptions | undefined <optional>
Logo.
projection
ol.proj.ProjectionLike Projection. Default is
EPSG:3857
.maxZoom
number | undefined <optional>
Optional max zoom level. Default is
18
.minZoom
number | undefined <optional>
Unsupported (TODO: remove this).
tileLoadFunction
ol.TileLoadFunctionType | undefined <optional>
Optional function to load a tile given a URL.
tilePixelRatio
number | undefined <optional>
The pixel ratio used by the tile service. For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px by 512px images (for retina/hidpi devices) then
tilePixelRatio
should be set to2
. Default is1
.tileSize
number | ol.Size | undefined <optional>
The tile size used by the tile service. Default is
[256, 256]
pixels.tileUrlFunction
ol.TileUrlFunctionType | undefined <optional>
Optional function to get tile URL given a tile coordinate and the projection. Required if url or urls are not provided.
url
string | undefined <optional>
URL template. Must include
{x}
,{y}
or{-y}
, and{z}
placeholders.urls
Array.<string> | undefined <optional>
An array of URL templates.
wrapX
boolean | undefined <optional>
Whether to wrap the world horizontally. Default is
true
. -
olx.source.ZoomifyOptions{Object} experimental
-
Properties:
Name Type Argument Description attributions
Array.<ol.Attribution> | undefined <optional>
Attributions.
crossOrigin
null | string | undefined <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.logo
string | olx.LogoOptions | undefined <optional>
Logo.
url
string Prefix of URL template.
tierSizeCalculation
string | undefined <optional>
Tier size calculation method:
default
ortruncated
.size
ol.Size Size of the image.