HoloMap.Layer.Symbol (HoloMap v0.1.0)

Copy Markdown View Source

Icons and text labels.

A HoloMap.Layer locked to type: "symbol". See that module for the full prop list, ordering rules and event payloads. Everything here is identical apart from the layer type, which is fixed and cannot be overridden.

Paint properties

text_color, text_halo_color, text_halo_width, text_opacity, icon_color, icon_opacity, icon_halo_color, icon_halo_width, text_translate, icon_translate.

Layout properties

text_field, text_font, text_size, text_anchor, text_offset, text_allow_overlap, text_ignore_placement, icon_image, icon_size, icon_anchor, icon_allow_overlap, symbol_placement, symbol_spacing, symbol_sort_key, visibility.

icon_image names an image, it does not fetch one. The name must exist in the style's own sprite, or be registered with HoloMap.Image. Naming one that exists in neither draws nothing and reports no error.

Property names may be written as atoms in Elixir style (:fill_color) or as MapLibre specification names ("fill-color"); both reach MapLibre as the latter. The full reference lives in the MapLibre style specification.

Summary

Functions

Returns true to indicate that the callee module is a component module (has "use Hologram.Component" directive).

Returns the list of property definitions for the compiled component.

Functions

__is_hologram_component__()

@spec __is_hologram_component__() :: boolean()

Returns true to indicate that the callee module is a component module (has "use Hologram.Component" directive).

Examples

iex> __is_hologram_component__()
true

__props__()

@spec __props__() :: [{atom(), atom(), keyword()}]

Returns the list of property definitions for the compiled component.