HoloMap.Control.Scale (HoloMap v0.1.0)

Copy Markdown View Source

A scale bar showing ground distance.

<HoloMap.Control.Scale unit="metric" max_width={120} position="bottom-left" />

Props

PropTypeNotes
positionstringCorner to place the control in. Default "top-right"
unitstring"metric", "imperial" or "nautical"
max_widthnumberMaximum bar width in pixels. Default 100

The bar picks a round distance that fits within max_width, so the number changes as the user zooms.

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.