Classes
Type Definitions
-
Options{Object}
-
Properties:
Name Type Description attributionsAttributionLike | undefined Attributions.
attributionsCollapsibleboolean
(defaults to true)Attributions are collapsible.
cacheSizenumber | undefined Deprecated. Use the cacheSize option on the layer instead.
crossOriginnull | string | undefined The
crossOriginattribute for loaded images. Note that you must provide acrossOriginvalue 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.interpolateboolean
(defaults to true)Use interpolated values when resampling. By default, linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
paramsObject.<string, *> WMS request parameters. At least a
LAYERSparam is required.STYLESis''by default.VERSIONis1.3.0by default.WIDTH,HEIGHT,BBOXandCRS(SRSfor WMS version < 1.3.0) will be set dynamically.gutternumber
(defaults to 0)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. 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_bufferconfiguration parameter for this. See https://mapserver.org/output/tile_mode.html.hidpiboolean
(defaults to true)Use the
ol/Map#pixelRatiovalue when requesting the image from the remote server.projectionProjectionLike | undefined Projection. Default is the view projection.
reprojectionErrorThresholdnumber
(defaults to 0.5)Maximum allowed reprojection error (in pixels). Higher values can increase reprojection performance, but decrease precision.
tileClassClass<ImageTile> | undefined Class used to instantiate image tiles. Default is
ImageTile.tileGridTileGrid | undefined 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.
serverTypeServerType | undefined The type of the remote WMS server:
mapserver,geoserver,carmentaserver, orqgis. Only needed ifhidpiistrue.tileLoadFunctionLoadFunction | undefined Optional function to load a tile given a URL. The default is
function(imageTile, src) { imageTile.getImage().src = src; };urlstring | undefined WMS service URL.
urlsArray.<string> | undefined WMS service urls. Use this instead of
urlwhen the WMS supports multiple urls for GetMap requests.wrapXboolean
(defaults to true)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.transitionnumber | undefined Duration of the opacity transition for rendering. To disable the opacity transition, pass
transition: 0.zDirectionnumber | NearestDirectionFunction
(defaults to 0)Choose whether to use tiles with a higher or lower zoom level when between integer zoom levels. See
getZForResolution.