Taos API Reference
    Preparing search index...

    Class GeoJsonLayer

    Index

    Properties

    meshes: GeoJsonDrawMesh[] = []

    Drawable meshes (polygons, then polylines) — feed each to the deferred geometry pass.

    points: GeoPointAnchor[]

    Point-feature anchors (ECEF), for a label / billboard pass.

    polygonAnchors: GeoPointAnchor[]

    Polygon centroid anchors (ECEF, at roof height), so polygons can carry name labels too.

    bakeOriginEcef: Vec3d

    The ECEF the geometry was baked relative to — for the roam-safe originShift.

    Accessors

    Methods

    • The world translation to draw the (origin-baked) meshes with under the CURRENT frame — 0 until the floating origin moves, then the shift that keeps the geometry put across a reanchor. Set it as the model-matrix translation / GameObject position each frame for a roaming camera; a static local scene can ignore it.

      Parameters

      Returns Vec3d

    • Builds screen-space SDF labels from the layer's features — text from each feature's textProperty (default name); features without it are skipped. Includes polygon centroid labels unless includePolygons is false. Feed the result (with the frame) to a GeoLabelFeature via its structural GeoLabelSource.

      Parameters

      Returns GeoLabel[]

    • Ray-picks the loaded polygons (needs style.pickable). origin/dir must be in the geometry's bake-frame world space — i.e. apply the inverse originShift to a current camera ray when the origin has roamed (a static local scene needs no correction). dir should be unit length. Returns the nearest feature + its properties, or null.

      Parameters

      • origin: [number, number, number]
      • dir: [number, number, number]

      Returns GeoJsonPick | null

    • Recolors one polygon feature in place by rewriting its vertices in the shared color buffer (needs style.pickable). No-op when not pickable / id out of range.

      Parameters

      • featureId: number
      • rgb: [number, number, number]

      Returns void

    • Applies a declarative Cesium3DTileStyle to the polygon features (needs style.pickable), the Taos analog of CesiumJS tileset.style = .... Each feature's properties drive its color (written into the vertex RGBA buffer) and show (a hidden feature gets vertex alpha 0). Hiding switches the shared material's MASK alpha-test on so the geometry pass discards alpha-0 fragments; with nothing hidden it's left off (opaque). Call resetColors to revert. No-op when not pickable.

      Parameters

      Returns void

    • Frees the GPU buffers of every baked mesh (the shared material is left for the caller).

      Returns void