Skip to content

Commit 43fbb51

Browse files
committed
Props advancement
1 parent 43790eb commit 43fbb51

13 files changed

+118
-120
lines changed

docs/components/l-circle-marker.md

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

55
# LCircleMarker
66

7-
> A marker in the shape of a circle
7+
> A circle of a fixed size with radius specified in pixels.
88
99
## Demo
1010

@@ -48,7 +48,7 @@ import { LMap, LTileLayer, LCircleMarker } from '@vue-leaflet/vue-leaflet';
4848

4949
| Prop name | Description | Type | Required | Default |
5050
| --------- | ------------------------------------ | ----------------------------------- | -------- | ------- |
51-
| radius | Radius of the marker in pixels | Number | true | - |
51+
| radius | Radius of the marker in pixels | Number | true | 10 |
5252
| latLng | Latitude and longitude of the marker | object\|array as L.LatLngExpression | true | [0, 0] |
5353

5454
### Inherited props

docs/components/l-circle.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ outline: deep
44

55
# LCircle
66

7-
> Draw a path in the shape of a circle around a center positioned at `latLng` coordinates
7+
> Draw a path in the shape of a circle around a center positioned at `latLng` coordinates.
8+
9+
> It's an approximation and starts to diverge from a real circle closer to the poles (due to projection distortion).
810
911
## Demo
1012

@@ -46,32 +48,14 @@ import { LMap, LTileLayer, LCircle } from '@vue-leaflet/vue-leaflet';
4648

4749
## Props
4850

49-
| Prop name | Description | Type | Values | Default |
50-
| ------------------- | ---------------------------------------------------- | ------------- | ------ | ------------- |
51-
| pane | | string | - | 'overlayPane' |
52-
| attribution | | string | - | null |
53-
| name | | string | - | undefined |
54-
| layerType | | string | - | undefined |
55-
| visible | | boolean | - | true |
56-
| interactive | | boolean | - | true |
57-
| bubblingMouseEvents | | boolean | - | true |
58-
| lStyle | | object | - | null |
59-
| stroke | | boolean | - | true |
60-
| color | | string | - | '#3388ff' |
61-
| weight | | number | - | 3 |
62-
| opacity | | number | - | 1.0 |
63-
| lineCap | | string | - | 'round' |
64-
| lineJoin | | string | - | 'round' |
65-
| dashArray | | string | - | null |
66-
| dashOffset | | string | - | null |
67-
| fill | | boolean | - | true |
68-
| fillColor | | string | - | '#3388ff' |
69-
| fillOpacity | | number | - | 0.2 |
70-
| fillRule | | string | - | 'evenodd' |
71-
| className | | string | - | null |
72-
| radius | | number | - | null |
73-
| options | Leaflet options to pass to the component constructor | object | - | {} |
74-
| latLng | | object\|array | - | () => [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 | true | [0, 0] |
55+
56+
### Inherited props
57+
58+
<!--@include: ./props/path-props.md-->
7559

7660
## Events
7761

@@ -84,4 +68,4 @@ import { LMap, LTileLayer, LCircle } from '@vue-leaflet/vue-leaflet';
8468

8569
| Name | Description | Bindings |
8670
| ------- | ----------- | -------- |
87-
| default | | |
71+
| default | | |

docs/components/l-control-attribution.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ outline: deep
44

55
# LControlAttribution
66

7-
> Add any custom component as a leaflet control-attribution
7+
> The attribution control allows you to display attribution data in a small text bos on a map.
88
99
## Demo
1010

@@ -38,14 +38,16 @@ import { LMap, LTileLayer, LControlAttribution } from '@vue-leaflet/vue-leaflet'
3838

3939
## Props
4040

41-
| Prop name | Description | Type | Values | Default |
42-
| --------- | ---------------------------------------------------- | --------------- | ------ | ---------- |
43-
| position | | string | - | 'topright' |
44-
| options | Leaflet options to pass to the component constructor | object | - | {} |
45-
| prefix | | string\|boolean | - | null |
41+
| Prop name | Description | Type | Required | Default |
42+
| --------- | --------------------------------------------------------------------- | --------------- | -------- | --------- |
43+
| prefix | The HTML text shown before the attributions. Pass `false` to disable. | String\|boolean | - | 'Leaflet' |
44+
45+
### Inherited props
46+
47+
<!--@include: ./props/control-props.md-->
4648

4749
## Events
4850

4951
| Event name | Type | Description |
5052
| ---------- | ------ | ------------------------------------ |
51-
| ready | object | Triggers when the component is ready |
53+
| ready | object | Triggers when the component is ready |

docs/components/l-control-layers.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ outline: deep
44

55
# LControlLayers
66

7-
> Add any custom component as a leaflet control-layers
7+
> The layers control gives users the ability to switch between different base layers and switch overlays on/off.
88
99
## Demo
1010

@@ -38,18 +38,20 @@ import { LMap, LTileLayer, LControlLayers } from '@vue-leaflet/vue-leaflet';
3838

3939
## Props
4040

41-
| Prop name | Description | Type | Values | Default |
42-
| -------------- | ---------------------------------------------------- | ------- | ------ | ---------- |
43-
| position | | string | - | 'topright' |
44-
| options | Leaflet options to pass to the component constructor | object | - | {} |
45-
| collapsed | | boolean | - | true |
46-
| autoZIndex | | boolean | - | true |
47-
| hideSingleBase | | boolean | - | false |
48-
| sortLayers | | boolean | - | false |
49-
| sortFunction | | func | - | undefined |
41+
| Prop name | Description | Type | Required | Default |
42+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | ------- |
43+
| collapsed | If `true`, the control will be collapsed into an icon and expanded on mouse hover, touch, or keyboard activation. | Boolean | - | true |
44+
| autoZIndex | If `true`, the control will assing zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off. | Boolean | - | true |
45+
| hideSingleBase | If `true`, the base layers in the control will be hidden when there is only one. | Boolean | - | false |
46+
| sortLayers | Whether to sort the layers. When `false`, layers will keep the order in which they were added to the control. | Boolean | - | false |
47+
| sortFunction | A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) that will be used for sorting the layers, when `sortLayers` is `true`. The function receives both the [L.Layer](https://leafletjs.com/reference.html#layer) instances and their names, as in `sortFunction(layerA, layerB, nameA, nameB)`. By default, it sorts layers alphabetically by their name. | Function | - | * |
48+
49+
### Inherited props
50+
51+
<!--@include: ./props/control-props.md-->
5052

5153
## Events
5254

5355
| Event name | Type | Description |
5456
| ---------- | ------ | ------------------------------------ |
55-
| ready | object | Triggers when the component is ready |
57+
| ready | object | Triggers when the component is ready |

docs/components/l-control-scale.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ outline: deep
44

55
# LControlScale
66

7-
> Add any custom component as a leaflet control-scale
7+
> A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems.
88
99
## Demo
1010

@@ -38,17 +38,19 @@ import { LMap, LTileLayer, LControlScale } from '@vue-leaflet/vue-leaflet';
3838

3939
## Props
4040

41-
| Prop name | Description | Type | Values | Default |
42-
| -------------- | ---------------------------------------------------- | ------- | ------ | ---------- |
43-
| position | | string | - | 'topright' |
44-
| options | Leaflet options to pass to the component constructor | object | - | {} |
45-
| maxWidth | | number | - | 100 |
46-
| metric | | boolean | - | true |
47-
| imperial | | boolean | - | true |
48-
| updateWhenIdle | | boolean | - | false |
41+
| Prop name | Description | Type | Required | Default |
42+
| -------------- | -------------------------------------------------------------------------------------------------------------- | ------- | -------- | ------- |
43+
| maxWidth | Maximum width of the control in pixels. The width is set dynamically to show round values (eg. 100, 200, 500). | Number | - | 100 |
44+
| metric | Whether to show the metric scale line (m/km). | Boolean | - | true |
45+
| imperial | Whether to show the imperial scale line (mi/ft). | Boolean | - | true |
46+
| updateWhenIdle | If `true`, the control is updated on [moveend](https://leafletjs.com/reference.html#map-moveend), otherwise it's always up-to-date (updated on [move](https://leafletjs.com/reference.html#map-move)). | Boolean | - | false |
47+
48+
### Inherited props
49+
50+
<!--@include: ./props/control-props.md-->
4951

5052
## Events
5153

5254
| Event name | Type | Description |
5355
| ---------- | ------ | ------------------------------------ |
54-
| ready | object | Triggers when the component is ready |
56+
| ready | object | Triggers when the component is ready |

docs/components/l-control-zoom.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ outline: deep
44

55
# LControlZoom
66

7-
> Add any custom component as a leaflet control-zoom
7+
> A basic zoom control with two buttons (zoom in and zoom out).
88
99
## Demo
1010

@@ -38,17 +38,19 @@ import { LMap, LTileLayer, LControlZoom } from '@vue-leaflet/vue-leaflet';
3838

3939
## Props
4040

41-
| Prop name | Description | Type | Values | Default |
42-
| ------------ | ---------------------------------------------------- | ------ | ------ | ---------- |
43-
| position | | string | - | 'topright' |
44-
| options | Leaflet options to pass to the component constructor | object | - | {} |
45-
| zoomInText | | string | - | '+' |
46-
| zoomInTitle | | string | - | 'Zoom in' |
47-
| zoomOutText | | string | - | '-' |
48-
| zoomOutTitle | | string | - | 'Zoom out' |
41+
| Prop name | Description | Type | Required | Default |
42+
| ------------ | -------------------------------------- | ------ | -------- | ---------- |
43+
| zoomInText | The text set on the 'zoom in' button | String | - | '+' |
44+
| zoomInTitle | The title set on the 'zoom in' button | String | - | 'Zoom in' |
45+
| zoomOutText | The text set on the 'zoom out' button | String | - | '-' |
46+
| zoomOutTitle | The title set on the 'zoom out' button | String | - | 'Zoom out' |
47+
48+
### Inherited props
49+
50+
<!--@include: ./props/control-props.md-->
4951

5052
## Events
5153

5254
| Event name | Type | Description |
5355
| ---------- | ------ | ------------------------------------ |
54-
| ready | object | Triggers when the component is ready |
56+
| ready | object | Triggers when the component is ready |

docs/components/l-control.md

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

55
# LControl
66

7-
> Add any custom component as a leaflet control
7+
> Base component for implementing map controls. Handles positioning. All other controls extend from this component.
88
99
## Demo
1010

@@ -58,12 +58,14 @@ const clickHandler = () => {
5858

5959
## Props
6060

61-
| Prop name | Description | Type | Values | Default |
62-
| ------------------------ | ---------------------------------------------------- | ------- | ------ | ---------- |
63-
| position | | string | - | 'topright' |
64-
| options | Leaflet options to pass to the component constructor | object | - | {} |
65-
| disableClickPropagation | | boolean | - | true |
66-
| disableScrollPropagation | | boolean | - | false |
61+
| Prop name | Description | Type | Required | Default |
62+
| ------------------------ | ----------- | ------- | -------- | ------- |
63+
| disableClickPropagation | | Boolean | - | true |
64+
| disableScrollPropagation | | Boolean | - | false |
65+
66+
### Inherited props
67+
68+
<!--@include: ./props/control-props.md-->
6769

6870
## Events
6971

@@ -75,4 +77,4 @@ const clickHandler = () => {
7577

7678
| Name | Description | Bindings |
7779
| ------- | ----------- | -------- |
78-
| default | | |
80+
| default | | |

docs/components/l-feature-group.md

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

55
# LFeatureGroup
66

7-
> Group together elements of the maps including: markers, geoJSON, polylines and polygon, tooltip and popup.
7+
> Extended [LLayerGroup](/components/l-layer-group.html) that makes it easier to do the same thing to all its member layers.
88
99
::: warning
1010
This still needs better documentation and examples.
@@ -46,14 +46,11 @@ import { LMap, LTileLayer, LFeatureGroup, LMarker } from '@vue-leaflet/vue-leafl
4646

4747
## Props
4848

49-
| Prop name | Description | Type | Values | Default |
50-
| ----------- | ---------------------------------------------------- | ------- | ------ | ------------- |
51-
| pane | | string | - | 'overlayPane' |
52-
| attribution | | string | - | null |
53-
| name | | string | - | undefined |
54-
| layerType | | string | - | undefined |
55-
| visible | | boolean | - | true |
56-
| options | Leaflet options to pass to the component constructor | object | - | {} |
49+
This component does not have any specific props.
50+
51+
### Inherited props
52+
53+
<!--@include: ./props/layer-group-props.md-->
5754

5855
## Events
5956

@@ -66,4 +63,4 @@ import { LMap, LTileLayer, LFeatureGroup, LMarker } from '@vue-leaflet/vue-leafl
6663

6764
| Name | Description | Bindings |
6865
| ------- | ----------- | -------- |
69-
| default | | |
66+
| default | | |

0 commit comments

Comments
 (0)