Skip to content

TileLayer.WMS

Used to display WMS services as tile layers on the map. Extends TileLayer.

Usage example

js
const nexrad = new TileLayer.wms("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", {
layers: 'nexrad-n0r-900913',
format: 'image/png',
transparent: true,
attribution: "Weather data © 2012 IEM Nexrad"
});

Options

OptionTypeDefaultDescription
layersString''(required) Comma-separated list of WMS layers to show.
stylesString''Comma-separated list of WMS styles.
formatString'image/jpeg'WMS image format (use 'image/png' for layers with transparency).
transparentBooleanfalseIf true, the WMS service will return images with transparency.
versionString'1.1.1'Version of the WMS service to use
crsCRSnullCoordinate Reference System to use for the WMS requests, defaults to
uppercaseBooleanfalseIf true, WMS request parameter keys will be uppercase.