TileLayer.WMS
Used to display WMS services as tile layers on the map. Extends TileLayer.
Usage example
var nexrad = L.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"
});
Creation
Factory | Description |
---|---|
L.tileLayer.wms(
|
Options
Includes all TileLayer options and additionally:
Option | Type | Default | Description |
---|---|---|---|
layers |
String |
'' |
(required) Comma-separated list of WMS layers to show. |
styles |
String |
'' |
Comma-separated list of WMS styles. |
format |
String |
'image/jpeg' |
WMS image format (use 'image/png' for layers with transparency). |
transparent |
Boolean |
false |
If true , the WMS service will return images with transparency. |
version |
String |
'1.1.1' |
Version of the WMS service to use. |
crs |
CRS |
null |
Coordinate Reference System to use for the WMS requests, defaults to map CRS. Don't change this if you're not sure what it means. |
Methods
Method | Returns | Description |
---|---|---|
setParams(
|
this |
Merges an object with the new parameters and re-requests tiles on the current screen (unless noRedraw was set to true ). |