mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
Tighten the point-navigation doc comments and state note
This commit is contained in:
1 parent
6e70793f66
commit
ed586a40a1
3 files changed
+7
-7
No files matched your search
Vendored
+2
-2
@@ -336,13 +336,13 @@ export function createControls({ state: layerState, services, parts, source }) {
|
||||
},
|
||||
|
||||
/**
|
||||
* Selects the camera nearest an explicit WGS84 point and optionally flies.
|
||||
* Selects the camera nearest a WGS84 point and optionally flies to it.
|
||||
* @param {number} lat Latitude in degrees.
|
||||
* @param {number} lon Longitude in degrees.
|
||||
* @param {Object} [options={}]
|
||||
* @param {boolean} [options.focus=true] Whether to fly after selection.
|
||||
* @param {number} [options.durationSec] Fly-to duration in seconds.
|
||||
* @returns {string|null} The nearest camera ID, or null if none found.
|
||||
* @returns {string|null} Camera ID, or null (invalid point, empty catalog).
|
||||
*/
|
||||
focusNearestToPoint(lat, lon, options = {}) {
|
||||
const nearest = parts.navigation.nearestCameraIdToPoint(lat, lon);
|
||||
|
||||
@@ -9,10 +9,10 @@ export function createNavigation({
|
||||
source,
|
||||
}) {
|
||||
/**
|
||||
* Find the catalog camera nearest one WGS84 point.
|
||||
* Nearest catalog camera to a WGS84 point.
|
||||
* @param {number} lat Latitude in degrees.
|
||||
* @param {number} lon Longitude in degrees.
|
||||
* @returns {string|null} Camera ID of the nearest camera, or null.
|
||||
* @returns {string|null} Camera ID, or null (invalid point, empty catalog).
|
||||
*/
|
||||
function nearestCameraIdToPoint(lat, lon) {
|
||||
const latitude = Number(lat);
|
||||
|
||||
Reference in new issue
Block a user