2022-04-05 16:33:14 +02:00
|
|
|
# leaflet
|
|
|
|
|
|
2025-02-06 01:53:13 +01:00
|
|
|
`leaflet` is an [OCaml] bindings library for the [Leaflet] JavaScript library (v1.9.4).
|
2022-04-05 16:33:14 +02:00
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
|
|
`leaflet` can be installed with [opam]:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
opam install leaflet
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If you don't have `opam`, you can install it following the [how to install opam] guide.
|
|
|
|
|
|
|
|
|
|
If you can't or don't want to use `opam`, consult the [opam file] for build instructions.
|
|
|
|
|
|
2022-05-19 23:02:04 +02:00
|
|
|
## Usage
|
2022-04-05 16:33:14 +02:00
|
|
|
|
2025-02-06 01:53:13 +01:00
|
|
|
The library use `dune-site` to install [leaflet's files] (CSS and images).
|
2022-04-05 16:33:14 +02:00
|
|
|
|
2025-02-06 01:53:13 +01:00
|
|
|
Have a look at the [example] folder.
|
|
|
|
|
It use [tiny_httpd] to provide a simple web page with a map that use [OpenStreetMap] tiles:
|
|
|
|
|
```sh
|
|
|
|
|
dune build @install
|
|
|
|
|
dune exec example/server.exe
|
|
|
|
|
```
|
2022-04-05 16:33:14 +02:00
|
|
|
|
|
|
|
|
## About
|
|
|
|
|
|
2025-02-06 01:53:13 +01:00
|
|
|
This library started off from the code of a [NGI0 funded project]
|
2022-04-12 13:46:37 +02:00
|
|
|
|
2022-04-05 16:33:14 +02:00
|
|
|
- [LICENSE]
|
|
|
|
|
- [CHANGELOG]
|
|
|
|
|
|
|
|
|
|
[CHANGELOG]: ./CHANGES.md
|
|
|
|
|
[LICENSE]: ./LICENSE.md
|
|
|
|
|
[opam file]: ./leaflet.opam
|
|
|
|
|
[how to install opam]: https://opam.ocaml.org/doc/Install.html
|
|
|
|
|
[OCaml]: https://ocaml.org
|
|
|
|
|
[opam]: https://opam.ocaml.org/
|
2022-04-12 13:46:37 +02:00
|
|
|
[Leaflet]: https://leafletjs.com/
|
2025-02-06 01:53:13 +01:00
|
|
|
[Leaflet's files]: ./src/vendor/
|
2022-04-12 13:46:37 +02:00
|
|
|
[NGI0 funded project]: https://nlnet.nl/project/openEngiadina/
|
2025-02-06 01:53:13 +01:00
|
|
|
[tiny_httpd]: https://github.com/c-cube/tiny_httpd
|
|
|
|
|
[example]: ./example/
|
|
|
|
|
[OpenStreetMap]: https://www.openstreetmap.org
|