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 name | Description | Type | Required | Default |
---|---|---|---|---|
layers | Comma-separated list of WMS layers to show | String | true | '' |
styles | Comme-separated list of WMS styles | String | - | '' |
format | WMS image format (use image/png for layers with transparency) | String | - | 'image/jpeg' |
transparent | If true , the WMS service will return images with transparency | boolean | - | false |
version | Version of the WMS service to use | String | - | '1.1.1' |
crs | Coordinate 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 |
uppercase | If true , WMS request parameter keys will be uppercase. | Boolean | - | false |
Inherited props
from LTileLayer
Prop name | Description | Type | Required | Default |
---|---|---|---|---|
tms | If true , inverses Y axis numbering for tiles (turn this on for TMS services) | Boolean | - | false |
subdomains | Subdomains 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' |
detectRetina | If 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 |
url | A string of the form 'https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png' . See more in the original Leaflet documentation | String | true | null |
from LGridLayer
Prop name | Description | Type | Required | Default |
---|---|---|---|---|
opacity | Opacity of the tiles | Number | - | 1.0 |
zIndex | The explicit zIndex of the tile layer | Number | - | 1 |
tileSize | Width 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 |
noWrap | Whether 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 |
childRender | Function | true | * | |
minZoom | The minimum zoom level down to which this layer will be displayed (inclusive) | Number | - | undefined |
maxZoom | The maximum zoom level up to which this layer will be displayed (inclusive) | Number | - | undefined |
className | A custom class name to assign to the tile layer. Empty by default. | String | - | '' |
from layer.ts
Prop name | Description | Type | Required | Default |
---|---|---|---|---|
pane | By 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 default | String | - | 'overlayPane' |
attribution | String 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 |
name | String | - | - | |
layerType | String in ["base", "overlay"] | - | - | |
visible | Boolean | - | true |
from component.ts
Prop name | Description | Type | Required | Default |
---|---|---|---|---|
options | Leaflet options to pass to the component constructor | Object | - | {} |
Events
Event name | Type | Description |
---|---|---|
update:visible | boolean | Triggers when the visible prop needs to be updated |
ready | object | Triggers when the component is ready |