Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add polyline, polygon, rectangle and circle api docs #30

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions docs/content/api/l-circle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
+++
title = "Circle"
+++

HTML equivalent to `L.circle` function.
Can be a child of `l-map` or `l-layer-group` elements.

## Example

A standard way to initialise.

```html
<l-circle lat-lng="[0,0]"></l-circle>
```

## Parameters

Mandatory HTML properties to successfully instantiate.

| Attribute | Example | Description |
| -- | -- | -- |
| lat-lng | [45, 45] | LatLng position to define circle center location |

## Properties

| Attribute | Type | Description |
| -- | -- | -- |
| radius | number | |
| stroke | boolean | true |
| color | string | #3388ff |
| weight | number | 3 |
| opacity | number | 1.0 |
| lineCap | string | round |
| lineJoin | string | round |
| dashArray | string | null |
| dashOffset | string | null |
| fill | boolean | true |
| fillColor | string | #3388ff |
| fillOpacity | number | 0.2 |
| smoothFactor | number | 1.0 |
| noClip | boolean | false |
| interactive | boolean | true |

## Events

| Event key | Detail | Description |
| -- | -- | -- |
| l:layer:connected | | Triggered when connected to the document |



48 changes: 48 additions & 0 deletions docs/content/api/l-polygon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
+++
title = "Polygon"
+++

HTML equivalent to `L.polygon` function.
Can be a child of `l-map` or `l-layer-group` elements.

## Example

A standard way to initialise.

```html
<l-polygon lat-lngs="[[0,0], [1,0], [1, 1]]"></l-polygon>
```

## Parameters

Mandatory HTML properties to successfully instantiate.

| Attribute | Example | Description |
| -- | -- | -- |
| lat-lngs | [[0, 0], [1, 0], [1, 1]] | LatLngs to define extent |

## Properties

| Attribute | Type | Description |
| -- | -- | -- |
| stroke | boolean | true |
| color | string | #3388ff |
| weight | number | 3 |
| opacity | number | 1.0 |
| lineCap | string | round |
| lineJoin | string | round |
| dashArray | string | null |
| dashOffset | string | null |
| fill | boolean | true |
| fillColor | string | #3388ff |
| fillOpacity | number | 0.2 |
| smoothFactor | number | 1.0 |
| noClip | boolean | false |
| interactive | boolean | true |

## Events

| Event key | Detail | Description |
| -- | -- | -- |
| l:layer:connected | | Triggered when connected to the document |

48 changes: 48 additions & 0 deletions docs/content/api/l-polyline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
+++
title = "Polyline"
+++

HTML equivalent to `L.polyline` function.
Can be a child of `l-map` or `l-layer-group` elements.

## Example

A standard way to initialise.

```html
<l-polyline lat-lngs="[[0,0], [1,0], [1, 1]]"></l-polyline>
```

## Parameters

Mandatory HTML properties to successfully instantiate.

| Attribute | Example | Description |
| -- | -- | -- |
| lat-lngs | [[0, 0], [1, 0], [1, 1]] | LatLngs to define extent |

## Properties

| Attribute | Type | Description |
| -- | -- | -- |
| stroke | boolean | true |
| color | string | #3388ff |
| weight | number | 3 |
| opacity | number | 1.0 |
| lineCap | string | round |
| lineJoin | string | round |
| dashArray | string | null |
| dashOffset | string | null |
| fill | boolean | true |
| fillColor | string | #3388ff |
| fillOpacity | number | 0.2 |
| smoothFactor | number | 1.0 |
| noClip | boolean | false |
| interactive | boolean | true |

## Events

| Event key | Detail | Description |
| -- | -- | -- |
| l:layer:connected | | Triggered when connected to the document |

50 changes: 50 additions & 0 deletions docs/content/api/l-rectangle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
+++
title = "Rectangle"
+++

HTML equivalent to `L.rectangle` function.
Can be a child of `l-map` or `l-layer-group` elements.

## Example

A standard way to initialise.

```html
<l-rectangle lat-lng-bounds="[[0,0], [1,1]]"></l-rectangle>
```

## Parameters

Mandatory HTML properties to successfully instantiate.

| Attribute | Example | Description |
| -- | -- | -- |
| lat-lng-bounds | [[0, 0], [5, 5]] | LatLngBounds to define extent |

## Properties

| Attribute | Type | Description |
| -- | -- | -- |
| stroke | boolean | true |
| color | string | #3388ff |
| weight | number | 3 |
| opacity | number | 1.0 |
| lineCap | string | round |
| lineJoin | string | round |
| dashArray | string | null |
| dashOffset | string | null |
| fill | boolean | true |
| fillColor | string | #3388ff |
| fillOpacity | number | 0.2 |
| smoothFactor | number | 1.0 |
| noClip | boolean | false |
| interactive | boolean | true |

## Events

| Event key | Detail | Description |
| -- | -- | -- |
| l:layer:connected | | Triggered when connected to the document |