Skip to main content

flywave-mapview.pickresult

Home > @flywave/flywave-mapview > PickResult

PickResult interface

A general pick result. You can access the details of a picked geometry from the property intersection, which is available if a geometry was hit. If a road was hit, a [[RoadPickResult]] is returned, which has additional information, but no intersection.

Signature:

export interface PickResult 

Properties

Property

Modifiers

Type

Description

dataSourceName

string | undefined

Uniquely identifies the data source which provided the picked object.

dataSourceOrder

number | undefined

Data source order, useful for sorting a collection of picking results. A number for objects/features coming from tiles (as those have data sources attached), an undefined when objects are added via "mapView.mapAnchors.add(object)" - those are treated as base layer objects during picking (same as "dataSourceOrder: 0").

distance

number

Distance from the camera to the picking point; used to determine the closest object.

featureId?

number | string

(Optional) An optional feature ID of the picked object.

intersection?

THREE.Intersection

(Optional) Defined for geometry only.

point

THREE.Vector2 | THREE.Vector3

A 2D point in screen coordinates, or a 3D point in world coordinates.

renderOrder?

number

(Optional) Render order of the intersected object.

technique?

Technique

(Optional) Defined for roads or if enableTechniqueInfo option is enabled.

tileKey?

TileKey

(Optional) The tile key containing the picked object.

type

PickObjectType

General type of object.

userData?

any

(Optional) Optional user data that has been defined in the picked object.