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

Use new export API to avoid deprecation warnings with latest kino #61

Merged
merged 1 commit into from
Sep 21, 2023
Merged
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
14 changes: 12 additions & 2 deletions lib/kino/maplibre.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,22 @@ defmodule Kino.MapLibre do
@doc false
def static(%__MODULE__{} = ml) do
data = %{spec: ml.spec, events: ml.events}
Kino.JS.new(__MODULE__, data, export_info_string: "maplibre")

Kino.JS.new(__MODULE__, data,
export: fn data -> {"maplibre", data} end,
# TODO: remove legacy export attribute once we require Kino v0.11.0
export_info_string: "maplibre"
)
end

def static(%MapLibre{} = ml) do
data = %{spec: ml.spec, events: %{}}
Kino.JS.new(__MODULE__, data, export_info_string: "maplibre")

Kino.JS.new(__MODULE__, data,
export: fn data -> {"maplibre", data} end,
# TODO: remove legacy export attribute once we require Kino v0.11.0
export_info_string: "maplibre"
)
end

@doc """
Expand Down