Skip to content
DezfilDocsv0.1.0

API and agentsAPI reference

Style

object

A layer's full visual definition. Constant channels plus data-driven ones: strokeBy drives the outline color like fill drives the fill; pointRadiusBy and strokeWidthBy drive the sizes. Absent data-driven members mean the constant siblings apply.

  • fillFillPaint

  • fillOpacitynumber

    0-1 fill translucency; 1 = opaque. Colors are solid — the sliders own alpha. Default 1.

  • strokeobject

    Constant outline color {r, g, b, a}.

  • strokeOpacitynumber

    0-1 multiplier on the stroke alpha. Default 1.

  • strokeWidthnumber

  • pointRadiusnumber

  • opacitynumber

  • strokeByFillPaint

    Data-driven outline color; overrides stroke when present.

  • pointRadiusBySizeScale

    Data-driven point radius; overrides pointRadius.

  • strokeWidthBySizeScale

    Data-driven line/outline width; overrides strokeWidth.

  • heightBySizeScale

    Polygon extrusion by attribute: the domain maps linearly onto meters (range up to 100000; resolve with the scale operation, unit 'm'). Omit for flat.

  • labelobject

    Text labels on the layer; omit for none. On a simple-feature layer set attribute to the column whose value labels each feature (points at the point, lines and polygons at an interior anchor). On an aggregated hex/grid layer omit attribute — each cell labels itself with its aggregate value, compactly formatted. Heatmaps cannot be labeled.

    • attributestring

      Label source column; omit on aggregated layers.

    • sizenumberrequired

      Text size, 1-72; 12 is a good default. On simple layers this is screen pixels. On hex/grid layers it scales the label's proportion of its cell — cell labels zoom with the map, like the cells themselves.

    • colorobjectrequired

      Text color {r, g, b, a}. Pick against the basemap: white reads well on dark styles and imagery, a dark color on light styles.

    • haloWidthnumberrequired

      Halo rim behind the text, 0 (none) to 3 (widest). Replaced the legacy halo boolean: stored maps migrate on read; writes stating the boolean answer invalid_request.

    • haloColorobjectrequired

      Halo color {r, g, b, a}.

    • weightstring

      Absent = normal.

      One of normal, bold

    • anchorstring

      One of the nine compass positions plus center, relative to the feature's anchor point; absent = center.

    • offsetXnumber

      Pixels, -50 to 50; +x right. Absent = 0.

    • offsetYnumber

      Pixels, -50 to 50; +y down. Absent = 0.

    • rotationnumber

      Degrees, -180 to 180, counter-clockwise positive. Absent = 0.

    • textCasestring

      Applied before truncation. Absent = as-is.

      One of as-is, upper, lower

    • maxCharsnumberor null

      Truncate to N code points with an ellipsis (not counted), 1 to 80; null/absent = no truncation.

    • densitynumber

      Collision-culling density, 0 sparse to 1 dense; absent = 0.5. Table-backed layers only — tiled layers are exempt from thinning.

    • zoomFloornumberor null

      Show labels from this whole zoom level (0-24); null/absent = no floor.

    • priorityFieldstringor null

      Numeric column ranking which labels survive the cap and collisions (higher wins; nulls last); null/absent = stable feature order. Published maps carry the column's values.

    • capnumberor null

      Draw at most N labels (1-10000), after ranking; null/absent = no cap.

No other keys.

Dezfil · Apache-2.0docs from 7439201b