var phi = (90-lat)*(Math.PI/180);
var theta = (lng+180)*(Math.PI/180);
marker_mesh.position.x = ((rad) * Math.sin(phi)*Math.cos(theta));
marker_mesh.position.z = ((rad) * Math.sin(phi)*Math.sin(theta));
marker_mesh.position.y = ((rad) * Math.cos(phi));
根据上述情况,我的标记在3D球体上的位置没有正确地转换...有什么想法吗?
它相对接近(在同一个大陆上),但就是这样的:
鉴于以下情况...它应该呈现在
纬度: 41.7307619 经度: -71.276195
我的地球仪有一个 boundRadius: 500px
函数的当前结果为
x: -119.7801015013779
y: 332.8157297895266
z: 353.3927238766871