Vector tiles, from a TileJSON endpoint or an explicit tile URL template.
<HoloMap.Source.Vector id="basemap" url="https://tiles.example.com/basemap.json" />
<HoloMap.Source.Vector
id="parcels"
tiles={["https://tiles.example.com/parcels/{z}/{x}/{y}.pbf"]}
min_zoom={8}
max_zoom={14}
/>Layers reading from a vector source must set source_layer. A vector
tile carries several named layers and MapLibre has no way to guess which one
is meant:
<HoloMap.Layer.Fill id="water" source="basemap" source_layer="water"
paint={%{fill_color: "#a5d8ff"}} />Props
| Prop | Type | Notes |
|---|---|---|
id | string | Required. Referenced by layers' source prop |
url | string | TileJSON endpoint. Supply this or tiles |
tiles | list | Tile URL templates containing {z}, {x}, {y} |
min_zoom / max_zoom | number | Zoom range the tiles exist at |
bounds | list | [west, south, east, north] extent of the data |
scheme | string | "xyz" (default) or "tms" |
promote_id | string or map | Property to use as the feature id |
volatile | boolean | Skip the tile cache |
attribution | string | Attribution text |
Changing any of these is a structural update: the source is torn down and rebuilt, and the layers on top of it are detached and re-added around that.
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
@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
Returns the list of property definitions for the compiled component.