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

More API docs #32

Merged
merged 1 commit into from
Jul 19, 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
31 changes: 23 additions & 8 deletions docs/content/api/l-icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ title = "Icon"
HTML equivalent to `L.icon` function.
Can be a child of `l-map` or `l-layer-group` elements.

See [Leaflet docs](https://leafletjs.com/reference.html#icon).

## Example

A standard way to initialise.
Expand All @@ -25,26 +27,39 @@ A standard way to initialise.
></l-icon>
```

## Related elements

- [l-marker](@/api/l-marker.md)

## Parameters

Mandatory HTML properties to successfully instantiate.

| Attribute | Example | Description |
| -- | -- | -- |
| icon-url | image.png | URL to define icon image |
| Attribute | Example | Description |
| -- | -- | -- |

## Properties

| Attribute | Type | Description |
| -- | -- | -- |
| opacity | number | 1.0 |
| icon | string | JSON options to `setIcon` method |
| Attribute | Type | Description |
| -- | -- | -- |
| class-name | string | Custom class name |
| cross-origin | bool | |
| icon-anchor | Point | Coordinates of the "tip" of the icon |
| icon-retina-url | string | |
| icon-size | Point | Size of the icon in pixels |
| icon-url | string | URL to define icon image |
| popup-anchor | Point | |
| shadow-anchor | Point | |
| shadow-retina-url | string | Coordinates of the "tip" of the shadow |
| shadow-size | Point | Size in pixels |
| shadow-url | string | Url for shadow, no shadow if not specified |
| tooltip-anchor | Point | Coordinates relative to anchor |

## Events

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



4 changes: 4 additions & 0 deletions docs/content/api/l-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ To detect mobile device location, zoom to it and enable location event handlers.
</l-map>
```

## Related elements

- [l-pane](@/api/l-pane.md)

## Parameters

Mandatory HTML properties to successfully instantiate a map.
Expand Down
7 changes: 7 additions & 0 deletions docs/content/api/l-marker.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ A standard way to initialise.
<l-marker lat-lng="[0,0]"></l-marker>
```

## Related elements

- [l-div-icon](@/api/l-div-icon.md)
- [l-icon](@/api/l-icon.md)
- [l-popup](@/api/l-popup.md)
- [l-tooltip](@/api/l-tooltip.md)

## Parameters

Mandatory HTML properties to successfully instantiate.
Expand Down
27 changes: 18 additions & 9 deletions docs/content/api/l-pane.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
+++
title = "DivIcon"
title = "Pane"
+++

HTML equivalent to `L.` function.
HTML equivalent to `map.createPane(name)` function.

## Example

A standard way to initialise.
A standard way to initialise is inside a `<l-map>`.

```html
<l-map ...>
<l-pane name="countries">
...
</l-pane>
</l-map>
```

## Related elements

- [l-map](@/api/l-map.md)

## Parameters

Mandatory HTML properties to successfully instantiate.

| Attribute | Example | Description |
| -- | -- | -- |
| | | |
| Attribute | Example | Description |
| -- | -- | -- |
| name | countries | Name to give custom pane |

## Properties

Expand All @@ -27,9 +36,9 @@ Mandatory HTML properties to successfully instantiate.

## Events

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



2 changes: 1 addition & 1 deletion docs/content/api/l-popup.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "DivIcon"
title = "Popup"
+++

HTML equivalent to `L.` function.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/api/l-tile-layer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "DivIcon"
title = "TileLayer"
+++

HTML equivalent to `L.` function.
Expand Down
5 changes: 5 additions & 0 deletions docs/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,8 @@ td, th {
padding: var(--size-2);
text-align: left;
}

:where(a):where(:not(:hover)) {
text-decoration: inherit;
}