lngLatToLocal and localToLngLat convert between WGS84 longitude and latitude and the local metres of a site. The site’s geoAnchor is the local origin, and its trueNorthDeg turns the frame.
Import
Example
Notes
trueNorthDegis the angle from project north (−Z) to true north, in degrees, positive clockwise viewed from above.- A saved site takes any finite angle and stores it in −180 to 180:
replace-siteand an opened project turn 720 into 0 and 270 into −90. ANaNangle is refused with its path.
lngLatToLocal
Project a WGS84 point to site-local metres[x, z] (+X east, −Z north).
localToLngLat
Inverse of lngLatToLocal: site-local metres →[lng, lat].