Fix broken MapLibre Evented URLs (#2731)

This commit is contained in:
Raúl R Pearson 2024-08-01 13:51:30 +07:00 committed by GitHub
parent 8146bfd3b9
commit b24f4c322e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,7 +14,7 @@ To work with maps in Livebook we need two libraries:
* The [`maplibre`](https://hexdocs.pm/maplibre/MapLibre.html) * The [`maplibre`](https://hexdocs.pm/maplibre/MapLibre.html)
package allows us to define our map style specifications package allows us to define our map style specifications
* The [`kino_maplibre`](https://hexdocs.pm/kino_maplibre/) package instructs Livebook how to render our specifications and also provides some initial support for [MapLibre Evented API](https://maplibre.org/maplibre-gl-js/docs/API/classes/maplibregl.Evented/) * The [`kino_maplibre`](https://hexdocs.pm/kino_maplibre/) package instructs Livebook how to render our specifications and also provides some initial support for [MapLibre Evented API](https://maplibre.org/maplibre-gl-js/docs/API/classes/Evented/)
We will make extensive use of MapLibre's functions, so it's handy to alias the module to something shorter. We will make extensive use of MapLibre's functions, so it's handy to alias the module to something shorter.
@ -362,7 +362,7 @@ Ml.new() |> Kino.MapLibre.add_geocode_control()
## Interactive maps ## Interactive maps
As said before, the `MapLibre` package covers all the style specification, but for the interactivity of the [Evented API](https://maplibre.org/maplibre-gl-js/docs/API/classes/maplibregl.Evented/) we need `Kino.MapLibre`. As said before, the `MapLibre` package covers all the style specification, but for the interactivity of the [Evented API](https://maplibre.org/maplibre-gl-js/docs/API/classes/Evented/) we need `Kino.MapLibre`.
`Kino.MapLibre` supports two types of maps: static and dynamic. Essentially, a dynamic map can be updated on the fly without having to be re-evaluated. To make a map dynamic you need to wrap it in `Kino.MapLibre.new/1` `Kino.MapLibre` supports two types of maps: static and dynamic. Essentially, a dynamic map can be updated on the fly without having to be re-evaluated. To make a map dynamic you need to wrap it in `Kino.MapLibre.new/1`