MvtCurvedLineLabel

class MvtCurvedLineLabel(val coords: DoubleArray, val text: String, val attributes: TextAttributes, val charWidths: FloatArray, val textWidth: Float, val pixelSize: Int, val priority: Int = 0, val featureId: Long = 0, val repeatGapPx: Float = 1100.0f, displayName: String? = null) : AbstractRenderable

Per-glyph baseline-following text label for one MVT LINESTRING feature. Each render-pass projects the polyline's geographic waypoints into screen space, runs the arc-length placer to produce one MvtCurvedTextPlacer.GlyphRun per repeat, then emits a single- character Label per glyph with its own rotation matching the local tangent.

This is the "snake-along-the-curve" treatment that Mapbox's symbol-placement: line implements — visible improvement over MvtLabelGroup's single line-center label on sinuous features (rivers, winding roads). Repeats every repeatGapPx pixels of arc length so a long feature carries multiple legibility points.

Collision: each Label participates in MvtLabelGroup's screen-space collision via its own bounding box. Per-glyph collision would tear adjacent characters of the same word apart, so a single run is treated as one collision candidate via the average pixel size and width across its glyphs; callers can pass these to the global collision pass.

Construction is cheap (just holds inputs). The expensive work — projection, the arc-length walk and glyph placement — happens in doRender. The per-glyph Labels and the projection Vec2s are pooled and mutated in place across frames (the same persistent-Label pattern MvtLabelGroup uses), so steady-state per-frame allocation is bounded to the placer's transient output rather than the ~120 short-lived objects/label/frame a fresh-allocate path would churn.

Constructors

Link copied to clipboard
constructor(coords: DoubleArray, text: String, attributes: TextAttributes, charWidths: FloatArray, textWidth: Float, pixelSize: Int, priority: Int = 0, featureId: Long = 0, repeatGapPx: Float = 1100.0f, displayName: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard

Per-character pixel widths produced by the source font's earth.worldwind.render.Font.measureChars.

Link copied to clipboard

Set each frame by MvtLabelCollider's line collision pass BEFORE render: false culls this label. Defaults true so labels still show if no pass runs (the pass sets all false, then survivors true).

Link copied to clipboard
Link copied to clipboard
open override var displayName: String?
Link copied to clipboard

Source feature id (OSM way id), 0 when the source omits it. The collision pass dedups by id (a way clipped across tiles keeps one id) when non-zero, else by text + screen proximity.

Link copied to clipboard
open override var isEnabled: Boolean
Link copied to clipboard
open override var isPickEnabled: Boolean
Link copied to clipboard
open override var pickDelegate: Any?
Link copied to clipboard
Link copied to clipboard

Collision priority (higher wins) by road/water class; read by MvtLabelCollider's line phase.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var zOrder: Double

Functions

Link copied to clipboard
open override fun <T> getUserProperty(key: Any): T?
Link copied to clipboard
open override fun hasUserProperty(key: Any): Boolean
Link copied to clipboard
open override fun putUserProperty(key: Any, value: Any): Any?
Link copied to clipboard
open override fun removeUserProperty(key: Any): Any?
Link copied to clipboard
open override fun render(rc: RenderContext)