map.latLngToScreen
latLngToScreen(lat: number, lng: number): objectConvert lat/lng to screen pixel coordinates { x, y } in the canvas.
Steps:
- Convert lat/lng → world position via
latLngToWorld. - Apply cloudScene's world transform so position is in scene world space.
- Project through the camera using
Vector3.project(camera)→ NDC. - Convert NDC → pixel: x = (ndc.x + 1) / 2 * width, y = (1 - ndc.y) / 2 * height.
Returns null when map is disabled or scene/camera are not wired.
lat | number | |
lng | number |
Returns: object