MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / xyzFromLatLng

Function xyzFromLatLng

libs/mapv/mapv.3d.js:1788–1797  ·  view source on GitHub ↗
(lat, lng, radius)

Source from the content-addressed store, hash-verified

1786}
1787
1788function xyzFromLatLng(lat, lng, radius) {
1789 var phi = (90 - lat) * Math.PI / 180;
1790 var theta = (360 - lng) * Math.PI / 180;
1791
1792 return {
1793 x: radius * Math.sin(phi) * Math.cos(theta),
1794 y: radius * Math.cos(phi),
1795 z: radius * Math.sin(phi) * Math.sin(theta)
1796 };
1797}
1798
1799function flightPathLines() {
1800

Callers 1

generateControlPointsFunction · 0.85

Calls 2

sinMethod · 0.80
cosMethod · 0.80

Tested by

no test coverage detected