Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgryan committed May 4, 2024
1 parent 469bb9c commit d3dcf31
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,33 @@ Fine grained reactive frameworks such as [Solid JS](https://solidjs.com) or [Van

RESTful frameworks, like [HTMX](Https://htmx.org), that serve HTML over the wire are perfect choices for server rendered content.

## Usage

Include both Leaflet and Leaflet HTML in script tags in the head of the document.

```html
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""
/>
<script
src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""
></script>
<script src="https://unpkg.com/leaflet-html@latest/leaflet-html.umd.js"></script>
```

And remember to style the various map container elements with enough size to be visible.

```css
[data-leaflet-html] {
block-size: 100vh;
}
```

## Example

The HTML in `example/index.html` is a simple demonstration of the API.
Expand Down

0 comments on commit d3dcf31

Please sign in to comment.