Builders for imagemap sub-objects: tappable areas and their actions, plus the
base size, used by ExLine.Message.imagemap/5.
Ref: https://developers.line.biz/en/reference/messaging-api/#imagemap-message
Summary
Functions
A tappable area (pixels relative to baseUrl at baseSize).
Base size of the imagemap image.
Message imagemap action — sends text as the user when the area is tapped.
URI imagemap action — opens link_uri when the area is tapped.
Functions
A tappable area (pixels relative to baseUrl at baseSize).
iex> ExLine.Message.Imagemap.area(0, 0, 520, 1040)
%{x: 0, y: 0, width: 520, height: 1040}
Base size of the imagemap image.
iex> ExLine.Message.Imagemap.base_size(1040, 1040)
%{width: 1040, height: 1040}
Message imagemap action — sends text as the user when the area is tapped.
iex> ExLine.Message.Imagemap.message_action("hello", ExLine.Message.Imagemap.area(0, 0, 1, 1))
%{type: "message", text: "hello", area: %{x: 0, y: 0, width: 1, height: 1}}
URI imagemap action — opens link_uri when the area is tapped.
iex> ExLine.Message.Imagemap.uri_action("https://x", ExLine.Message.Imagemap.area(0, 0, 1, 1))
%{type: "uri", linkUri: "https://x", area: %{x: 0, y: 0, width: 1, height: 1}}