Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
See:
Members
The default snap tolerance used by
SnapService#snap when
options.snapAperture is not provided, in CSS pixels.
The value is implementation-defined.
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
Methods
async snap(options) → Promise.<(SnapService.Result|undefined)>
Requests a snap against geometry known to the service.
The camera and canvas dimensions describe the current view so the
implementation can perform view-dependent snapping (nearest ordering,
pixel apertures, surface tracking) correctly.
Implementations may accept additional options beyond those listed here.
| Name | Type | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Object with the following properties:
|
Returns:
The snap result, or
undefined if no snap was possible.
Type Definitions
The result of a successful
SnapService#snap.
Implementations may return additional properties beyond those listed here.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
snapPoint |
Cartesian3 |
<optional> |
The snapped point. This is the point to consume. |
hitPoint |
Cartesian3 |
<optional> |
The point where the cursor hit the geometry: the nearest edge point when within the snap aperture, otherwise the surface point under the cursor. |
