| | |
| | | |
| | | // 时间特效 |
| | | function setTime() { |
| | | // morning-早晨,noon-中午,evening-傍晚,night-夜晚,darkWorld-暗色场景 |
| | | // morning-早晨,noon-中午,evening-傍晚,night-夜晚,darkWorld-暗色场景,12 |
| | | map.setTime("evening"); |
| | | } |
| | | |
| | |
| | | z: 0, // z轴ue4坐标 |
| | | size: { width: 480, height: 180 }, // label的大小 |
| | | text: '测试文字', // 显示的文字 |
| | | scale: 1, // 缩放 |
| | | scale: 0.5, // 缩放 |
| | | type: 'Type1', // 类型 Default,Type1,Type2 |
| | | backgroundColor: "#ffffff", // 背景色支持rgba |
| | | fillColor: "#00ff00", // 文字颜色 |
| | |
| | | alertWindow: { // 可选,点击弹窗 |
| | | url: "http://192.168.20.89:12306/popupThree.html", // 弹窗地址 |
| | | size: new TUVector2(180, 90), // 弹窗大小 |
| | | offset: new TUVector2(50, -100) // 弹窗位置,右:x正,下:y正 |
| | | offset: new TUVector2(90, -90) // 弹窗位置,右:x正,下:y正 |
| | | } |
| | | } |
| | | |
| | |
| | | // obj.removeFromMap(); // 移除 |
| | | } |
| | | |
| | | // 光圈 |
| | | function createCircleArea() { |
| | | var param = { |
| | | location: new TUVector3(0, 0, 0), // 中心点 |
| | | radius: 15000, |
| | | type: 2, // 0上浮横格,1实色,2箭头,3三角 |
| | | color: "#ff0000", |
| | | height: 15000, // 默认5000 |
| | | brightness: 10 // 默认10 |
| | | } |
| | | var circle = map.createCircleArea(param); |
| | | // circle.removeFromMap(); // 移除 |
| | | } |
| | | |
| | | // 围栏 |
| | | function createAreaBoundary() { |
| | | var param = { |
| | |
| | | ] |
| | | }; |
| | | var bound = map.createAreaBoundary(param); |
| | | |
| | | map.focusOn(new TUVector3(739, 303, 1040), new TURotator(0, -73, 147), 107737); |
| | | |
| | | // bound.removeFromMap(); // 移除 |
| | |
| | | <button onclick="createBillboard();">POI点</button> |
| | | <button onclick="create3DBillboard();">3DPOI点</button> |
| | | <button onclick="createAreaData();">添加区域</button> |
| | | <button onclick="createCircleArea();">光圈</button> |
| | | <button onclick="createAreaBoundary();">围栏</button> |
| | | <button onclick="pickPosition();">获取镜头坐标</button> |
| | | <button onclick="pickObject();">拾取对象</button> |