API reference / @zaes/metoc / SymbolPainter
Interface: SymbolPainter<F>
Type Parameters
F
F
Methods
outline()
outline(feature): ProjectedPosition[];The painted outline in projected meters: a point's anchor, a line, or an area's closed ring.
Parameters
feature
F
Returns
paint()
paint(feature, context): Paint[];What a graphic looks like at one resolution, in EPSG:3857 meters.
Parameters
feature
F
context
Returns
Paint[]
pickBox()?
pickBox?(feature, resolution):
| {
height: number;
width: number;
x: number;
y: number;
}
| null;A point symbol's drawn box in CSS pixels, relative to its anchor (y down), as drawn at this resolution. The editor picks the symbol anywhere in it and outlines it when selected. Without it a point is picked within a small circle round its anchor, which misses a symbol drawn away from its anchor (a headquarters stands on a staff whose foot is the anchor).
Parameters
feature
F
resolution
number
Returns
| { height: number; width: number; x: number; y: number; } | null
underlay()?
underlay?(feature, context): Paint[];Marks in map units under a point symbol: an area of uncertainty, a trailer, a line to another position. They are drawn as marks however the symbol itself is drawn, so a renderer that draws a point as one image (MapLibre's point images, a symbol standing on a leader line) still lays them on the map at their size, under it. Elsewhere they come first in the graphic's marks.
Parameters
feature
F
context
Returns
Paint[]