Skip to content

Commit

Permalink
document TileLayer WMS with Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgryan committed Oct 30, 2024
1 parent cbb576a commit 859d0f9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/stories/TileLayerWMS.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import "../index.js"

export default {
title: "Example/TileLayerWMS",
tags: ['autodocs'],
render: ({ urlTemplate, layers, transparent }) => `<l-tile-layer-wms url-template=${urlTemplate} layers=${layers} transparent=${transparent}></l-tile-layer-wms>`,
argTypes: {
layers: { type: "string", control: "select", options: [
"TOPO-OSM-WMS",
"SRTM30-Colored-Hillshade",
"TOPO-WMS",
"OSM-Overlay-WMS",
"TOPO-WMS,OSM-Overlay-WMS",
"TOPO-WMS,SRTM30-Colored-Hillshade",
]}
},
args: {
urlTemplate: "http://ows.mundialis.de/services/service?",
layers: "SRTM30-Colored-Hillshade",
transparent: true
},
decorators: [(story) => `
<l-map center="[45, 0]" zoom="4">
${story()}
</l-map>
`],
}


export const Default = {
args: {}
}

0 comments on commit 859d0f9

Please sign in to comment.