Skip to content
DezfilDocsv0.1.0

API and agentsAPI reference

Viz

object

How the layer's result is drawn. points (default) draws the raw features. hexbin and grid aggregate points into cells server-side — results beyond the render cap stay renderable; cells expose value and count, colored by the viz fill (assigned automatically when omitted). heatmap draws point density. arc and line draw each row as an origin→destination pair from the mapped endpoints — arc as a curved swing with an adjustable height, line straight; the path's source color and width ride the style's stroke channels, and targetColor blends toward the destination. icon draws points as a glyph from the curated bundled set — size rides the style's point-radius channel, color its fill channel, fixed or by attribute. cluster aggregates points client-side into count-labeled bubbles by a pixel radius; zooming in dissolves them; clicking a bubble zooms toward where it breaks apart. Non-point layers keep simple rendering. hexbin/grid may carry elevation: cells extrude by an aggregate — count, or a function over a numeric field — so color and height can encode different things; the aggregate's range is resolved server-side and maps linearly onto [0, height] meters. Absent = flat, exactly as before.

  • typestringrequired

    One of points, hexbin, grid, heatmap, arc, line, icon, cluster

  • cellKmnumber

    hexbin/grid: cell edge length in web-mercator kilometres — a length on the map projection, not a ground distance. Web mercator stretches by 1/cos(latitude), so a 1.2 km cell covers about 730 m of ground at 52°N and about 410 m at 70°N. Any value 0.02-1000 (hexbin: hexagon edge; grid: square edge). Every other distance in this API — a buffer radius, a measured length — is ground metres.

  • aggregateAggregate

  • fillFillPaint

  • elevationobject

    hexbin/grid cell extrusion. height = the tallest prism in meters (100-20000); domain is resolved server-side — send aggregate and height only.

    • aggregateAggregaterequired

    • heightnumberrequiredminimum 100maximum 20000

    • domainarray of numbermin items 2max items 2

  • radiusPxnumber

    heatmap: kernel radius in pixels (1-200). cluster: clustering radius in pixels (20-120).

  • intensitynumber

    heatmap: intensity multiplier (0.1-10).

  • weightstringor null

    heatmap: numeric attribute weighting each point; null = 1.

  • originOdEndpoint

  • destOdEndpoint

  • heightnumber

    arc: swing relative to the endpoint distance (0.1-2).

  • targetColorobject

    arc/line: destination end of the color gradient as {r, g, b, a}; omit for one fixed color.

  • glyphstring

    icon: the glyph name from the curated Maki subset (e.g. 'cafe', 'parking', 'marker').

  • customSvgstringor null

    icon: sanitized custom SVG markup; when present it wins over the glyph, tinted by the fill channel like any glyph. Writes pass through the sanitizer — scripts, event handlers and references are stripped and reported (preview via /api/icons/sanitize); not-SVG, oversize (256 KB), and nothing-drawable inputs answer invalid_request. Null clears back to the glyph.

  • color

    cluster: 'fixed' paints the style's fill color; an Aggregate ({fn} or {fn, attribute}) colors bubbles on a sequential ramp over the current view's values.

  • showCountsboolean

    cluster: draw the count label on each bubble.

Dezfil · Apache-2.0docs from 7439201b