pub struct PickHit {Show 15 fields
pub category: HitCategory,
pub provenance: HitProvenance,
pub layer_id: Option<String>,
pub source_id: Option<String>,
pub source_layer: Option<String>,
pub source_tile: Option<TileId>,
pub feature_id: Option<String>,
pub feature_index: Option<usize>,
pub geometry: Option<Geometry>,
pub properties: HashMap<String, PropertyValue>,
pub state: FeatureState,
pub distance_meters: f64,
pub hit_coord: Option<GeoCoord>,
pub layer_priority: u32,
pub from_symbol: bool,
}Expand description
A single hit from a pick operation.
This is the canonical result type consumed by host applications. It provides identity, geometry, properties, state, distance, provenance, and category metadata for every hit.
Fields§
§category: HitCategoryBroad category of this hit.
provenance: HitProvenanceHow this hit was resolved.
layer_id: Option<String>Style layer id or runtime layer name that produced the hit.
source_id: Option<String>Style source id, when known.
source_layer: Option<String>Style source-layer id, when known.
source_tile: Option<TileId>Tile that supplied the feature, when known.
feature_id: Option<String>Stable feature id within the source.
feature_index: Option<usize>Source-local feature index.
geometry: Option<Geometry>Feature geometry, when available.
properties: HashMap<String, PropertyValue>Feature properties, when available.
state: FeatureStateMutable feature-state snapshot at query time.
distance_meters: f64Distance from the query position in meters.
hit_coord: Option<GeoCoord>Geographic coordinate of the hit point.
layer_priority: u32Layer-order priority (lower = rendered on top / higher priority).
This is derived from the reverse layer-stack index so that top-most rendered layers have the lowest priority value.
from_symbol: boolWhether the hit came from a placed symbol collision box.