下面的 Harp 示例使用屏幕位置和一些“未知”测量单位将多边形添加到地图中。如何根据形状的 lon/Lat 及其高度(以米为单位)添加多边形?
//Create the three.js cube
const geometry = new THREE.BoxGeometry(100, 100, 100);
const material = new THREE.MeshStandardMaterial({ color: 0x00ff00fe });
const cube = new THREE.Mesh(geometry, material);
cube.renderOrder = 100000;
//Get the position of the click
const geoPosition = map.getGeoCoordinatesAt(evt.pageX, evt.pageY);
cube.geoPosition = geoPosition;
//Add object to the map
map.mapAnchors.add(cube);
map.update();