Skip to content

Commit d0da244

Browse files
committed
Component documentation done
1 parent 43fbb51 commit d0da244

24 files changed

+213
-263
lines changed

docs/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default defineConfig({
2525
{
2626
text: 'Components',
2727
items: [
28-
{ text: 'Index', link: '/components/index' },
28+
{ text: 'Introduction', link: '/components/introduction' },
2929
{ text: 'LCircle', link: '/components/l-circle' },
3030
{ text: 'LCircleMarker', link: '/components/l-circle-marker' },
3131
{ text: 'LControlAttribution', link: '/components/l-control-attribution' },

docs/components/index.md renamed to docs/components/introduction.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
outline: deep
33
---
44

5-
::: warning
6-
Further documentation for these components was mostly copied from the [Vue2 Leaflet Documentation](https://vue2-leaflet.netlify.app/components/) and [Vue Leaflet Demo](https://github.com/vue-leaflet/vue-leaflet/tree/master/src/playground/views).
7-
8-
This still needs better documentation and examples.
5+
::: info
6+
Further documentation for these components was highly inspired from [Vue2 Leaflet Documentation](https://vue2-leaflet.netlify.app/components/), [Vue Leaflet Demo](https://github.com/vue-leaflet/vue-leaflet/tree/master/src/playground/views) and the original [Leaflet Documentation](https://leafletjs.com/).
97

108
If you find any errors, please open an issue on the [GitHub repository](https://github.com/gugustinette/Nuxt-Leaflet).
119
Props and events can be verified by looking at the [vue-leaflet components](https://github.com/vue-leaflet/vue-leaflet/tree/master/src/components).

docs/components/l-circle-marker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ import { LMap, LTileLayer, LCircleMarker } from '@vue-leaflet/vue-leaflet';
4646

4747
## Props
4848

49-
| Prop name | Description | Type | Required | Default |
50-
| --------- | ------------------------------------ | ----------------------------------- | -------- | ------- |
51-
| radius | Radius of the marker in pixels | Number | true | 10 |
52-
| latLng | Latitude and longitude of the marker | object\|array as L.LatLngExpression | true | [0, 0] |
49+
| Prop name | Description | Type | Required | Default |
50+
| --------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
51+
| radius | Radius of the marker in pixels | Number | true | 10 |
52+
| latLng | Latitude and longitude of the marker | object\|array as [L.LatLngExpression](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/45d34da16d9556b29be0469dbb66337735690feb/types/leaflet/v0/index.d.ts#L4) | true | [0, 0] |
5353

5454
### Inherited props
5555

docs/components/l-circle.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ import { LMap, LTileLayer, LCircle } from '@vue-leaflet/vue-leaflet';
4848

4949
## Props
5050

51-
| Prop name | Description | Type | Required | Default |
52-
| --------- | ------------------------------------ | ----------------------------------- | -------- | ------- |
53-
| radius | Radius of the circle, in meters | Number | true | - |
54-
| latLng | Latitude and longitude of the marker | object\|array as L.LatLngExpression | true | [0, 0] |
51+
| Prop name | Description | Type | Required | Default |
52+
| --------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
53+
| radius | Radius of the circle, in meters | Number | true | - |
54+
| latLng | Latitude and longitude of the marker | object\|array as [L.LatLngExpression](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/45d34da16d9556b29be0469dbb66337735690feb/types/leaflet/v0/index.d.ts#L4) | true | [0, 0] |
5555

5656
### Inherited props
5757

docs/components/l-grid-layer.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,7 @@ const childRender = (props) => () => {
7979

8080
## Props
8181

82-
| Prop name | Description | Type | Required | Default |
83-
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | -------- | --------- |
84-
| opacity | Opacity of the tiles | Number | - | 1.0 |
85-
| zIndex | The explicit zIndex of the tile layer | Number | - | 1 |
86-
| 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 |
87-
| 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](https://leafletjs.com/reference.html#map-crs) doesn't wrap around. | Boolean | - | false |
88-
| childRender | | Function | true | * |
89-
| minZoom | The minimum zoom level down to which this layer will be displayed (inclusive) | Number | - | undefined |
90-
| maxZoom | The maximum zoom level up to which this layer will be displayed (inclusive) | Number | - | undefined |
91-
| className | A custom class name to assign to the tile layer. Empty by default. | String | - | '' |
82+
<!--@include: ./props/grid-layer-props.md-->
9283

9384
### Inherited props
9485

docs/components/l-icon.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -127,24 +127,23 @@ const changeIcon = () => {
127127

128128
## Props
129129

130-
| Prop name | Description | Type | Values | Default |
131-
| --------------- | ----------- | ------------- | ------ | ------------ |
132-
| iconUrl | | string | - | null |
133-
| iconRetinaUrl | | string | - | null |
134-
| iconSize | | object\|array | - | null |
135-
| iconAnchor | | object\|array | - | null |
136-
| popupAnchor | | object\|array | - | () => [0, 0] |
137-
| tooltipAnchor | | object\|array | - | () => [0, 0] |
138-
| shadowUrl | | string | - | null |
139-
| shadowRetinaUrl | | string | - | null |
140-
| shadowSize | | object\|array | - | null |
141-
| shadowAnchor | | object\|array | - | null |
142-
| bgPos | | object\|array | - | () => [0, 0] |
143-
| className | | string | - | '' |
144-
| options | | object | - | {} |
130+
| Prop name | Description | Type | Required | Default |
131+
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------- |
132+
| iconUrl | The URL to the icon image (absolute or relative to your script path) | String | true | null |
133+
| iconRetinaUrl | The URL to a retina sized version of the icon image (absolute or relative to your script path). Used for Retina screen devices. | String | - | null |
134+
| iconSize | Size of the icon image in pixels | Object\|Array as [L.PointExpression](https://leafletjs.com/reference.html#point) | - | null |
135+
| iconAnchor | The coordinates of the "tip" of the icon (relative to its top left corner). The icon will be aligned so that this point is at the marker's geographical location. Centered by default if size is specified, also can be set in CSS with negative margins. | Object\|Array as [L.PointExpression](https://leafletjs.com/reference.html#point) | - | null |
136+
| popupAnchor | The coordinates of the point from which popups will "open", relative to the icon anchor | Object\|Array as [L.PointExpression](https://leafletjs.com/reference.html#point) | - | [0, 0] |
137+
| tooltipAnchor | The coordinates of the point from which tooltips will "open", relative to the icon anchor | Object\|Array as [L.PointExpression](https://leafletjs.com/reference.html#point) | - | [0, 0] |
138+
| shadowUrl | The URL to the icon shadow image. If not specified, no shadow image will be created | String | - | null |
139+
| shadowRetinaUrl | | String | - | null |
140+
| shadowSize | Size of the shadow image in pixels | Object\|Array as [L.PointExpression](https://leafletjs.com/reference.html#point) | - | null |
141+
| shadowAnchor | The coordinates of the "tip" of the shadow (relative to its top left corner) (the same as iconAnchor if not specified) | Object\|Array as [L.PointExpression](https://leafletjs.com/reference.html#point) | - | null |
142+
| bgPos | | Object\|Array as [L.PointExpression](https://leafletjs.com/reference.html#point) | - | [0, 0] |
143+
| className | A custom class name to assign to both icon and shadow images. Empty by default. | String | - | '' |
145144

146145
## Slots
147146

148147
| Name | Description | Bindings |
149148
| ------- | ----------- | -------- |
150-
| default | | |
149+
| default | | |

0 commit comments

Comments
 (0)