Skip to content

LWmsTileLayer

Display WMS services as tile layers on the map.

Demo

vue
<LMap style="height: 350px" :zoom="2" :center="[47.21322, -1.559482]">
  <LWmsTileLayer
    url="https://maps.heigit.org/osm-wms/service"
    attribution="HeiGIT <a href='https://osm-wms.de'>OSM WMS</a>"
    layer-type="base"
    name="osm-wms.de"
    :max-zoom="10"
    version="1.3.0"
    format="image/png"
    :transparent="true"
    layers="osm_auto:all"
  />
</LMap>

Props

Prop nameDescriptionTypeRequiredDefault
layersComma-separated list of WMS layers to showStringtrue''
stylesComme-separated list of WMS stylesString-''
formatWMS image format (use image/png for layers with transparency)String-'image/jpeg'
transparentIf true, the WMS service will return images with transparencyboolean-false
versionVersion of the WMS service to useString-'1.1.1'
crsCoordinate Reference System to use for the WMS requests, defaults to the map CRS. Don't change this if you're not sure what it means.Object as CRS-null
uppercaseIf true, WMS request parameter keys will be uppercase.Boolean-false

Inherited props

from LTileLayer
Prop nameDescriptionTypeRequiredDefault
tmsIf true, inverses Y axis numbering for tiles (turn this on for TMS services)Boolean-false
subdomainsSubdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings.String|Array as String|String[]-'abc'
detectRetinaIf true and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.Boolean-false
urlA string of the form 'https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png'. See more in the original Leaflet documentationStringtruenull
from LGridLayer
Prop nameDescriptionTypeRequiredDefault
opacityOpacity of the tilesNumber-1.0
zIndexThe explicit zIndex of the tile layerNumber-1
tileSizeWidth and height of tiles in the grid. Use a number if width and height are equal, or L.point(width, height) otherwise.Number|L.Point-256
noWrapWhether the layer is wrapped around the antimeridian. If true, the GridLayer will only be displayed once at low zoom levels. Has no effect when the map CRS doesn't wrap around.Boolean-false
childRenderFunctiontrue*
minZoomThe minimum zoom level down to which this layer will be displayed (inclusive)Number-undefined
maxZoomThe maximum zoom level up to which this layer will be displayed (inclusive)Number-undefined
classNameA custom class name to assign to the tile layer. Empty by default.String-''
from layer.ts
Prop nameDescriptionTypeRequiredDefault
paneBy default the layer will be added to the map's overlay pane. Overriding this option will cause the layer to be placed on another pane by defaultString-'overlayPane'
attributionString to be shown in the attribution control, e.g. "© OpenStreetMap contributors". It describes the layer data and is often a legal obligation towards copyright holders and tile providers.String-null
nameString--
layerTypeString in ["base", "overlay"]--
visibleBoolean-true
from component.ts
Prop nameDescriptionTypeRequiredDefault
optionsLeaflet options to pass to the component constructorObject-{}

Events

Event nameTypeDescription
update:visiblebooleanTriggers when the visible prop needs to be updated
readyobjectTriggers when the component is ready