| | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <script src="js/jquery.1.12.4.js"></script> |
| | | <script> |
| | | var token = "0de31b49-1957-4e15-8258-965a35ea56cb"; |
| | | var token = "b2657209-38ab-4ce3-af63-e2740bbd9f68"; |
| | | |
| | | $(function () { |
| | | $("#token").html(token); |
| | | }); |
| | | |
| | | // Ajax |
| | | function ajax(url, type, data, dataType, contentType, fn) { |
| | |
| | | |
| | | // 测试切图 |
| | | function convertXYZ() { |
| | | var data = { token: token, ids: [2919, 2920], id: 1, min: 8, max: 18, depcode: "000305", dircode: "0102", userId: 1, name: "DOM_0.2m" }; |
| | | var data = { token: token, ids: [1217], id: 1, min: 4, max: 17, depcode: "00", dircode: "0B", userId: 1, name: "5_A1", noData: 255 }; |
| | | ajax("Convert/ToTiles", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | |
| | | // 测试Rvt |
| | | // 测试Rvt * |
| | | function convert1() { |
| | | var data = { token: token, ids: [1521], depcode: "000305", dircode: "0102", userId: 1 }; |
| | | ajax("Convert/ToTileset", "POST", JSON.stringify(data), null, null, function (rs) { |
| | |
| | | |
| | | // 测试Fbx |
| | | function convert2() { |
| | | var data = { token: token, ids: [1522], depcode: "000305", dircode: "0102", userId: 1 }; |
| | | var data = { token: token, ids: [8362], depcode: "000305", dircode: "0102", userId: 1 }; |
| | | ajax("Convert/ToTileset", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | |
| | | |
| | | // 测试Ifc |
| | | function convert3() { |
| | | var data = { token: token, ids: [6894], depcode: "000305", dircode: "0A040001010004", userId: 1 }; |
| | | var data = { token: token, ids: [7615], depcode: "000305", dircode: "0A040001010004", userId: 1 }; |
| | | ajax("Convert/ToTileset", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | |
| | | |
| | | // 测试SG |
| | | function toSG() { |
| | | var data = { token: token, ids: [10516], depcode: "000305", dircode: "0102", userId: 1 }; // [1523, 1525] |
| | | var data = { token: token, ids: [10516], depcode: "000305", dircode: "0102", userId: 1 }; |
| | | ajax("Convert/ToSG", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | |
| | | // 测试Terra:10526,10527 |
| | | // 测试Terra:10526,10527 | 10531 |
| | | function toTerra() { |
| | | var data = { token: token, ids: [10526], min: 0, max: 18, depcode: "00", dircode: "09", userId: 1, name: "BN_GD" }; |
| | | var data = { token: token, ids: [1413, 1412], min: 0, max: 18, depcode: "00", dircode: "0B", userId: 1, name: "川二" }; |
| | | ajax("Convert/ToTerra", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | |
| | | |
| | | // 测试OSGB |
| | | function toOsgb() { |
| | | var data = { token: token, ids: [10290], depcode: "00", dircode: "0C", userId: 1, name: "3-1倾斜模型-中卫站", zs: [0] }; |
| | | var data = { token: token, ids: [10287], depcode: "00", dircode: "0C", userId: 1, name: "3-1倾斜模型-中卫站", zs: [0] }; |
| | | ajax("Convert/ToOsgb", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | |
| | | // LasByPy |
| | | function toLasByPy() { |
| | | var data = { token: token, ids: [7188], depcode: "00", dircode: "0C", userId: 1, name: "HL_point_cloud_part_1.las", srids: [4548], zs: [0] }; |
| | | ajax("Convert/ToLasByPy", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | |
| | | |
| | | // 测试Las |
| | | function toLas() { |
| | | var data = { token: token, ids: [7188], depcode: "00", dircode: "0C", userId: 1, name: "HL_point_cloud_part_1.las", srids: [4548], zs: [0] }; |
| | | var data = { token: token, ids: [10481], depcode: "00", dircode: "0C", userId: 1, name: "HL_point_cloud_part_1.las", srids: [4548], zs: [0] }; |
| | | ajax("Convert/ToLas", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | |
| | | |
| | | // 生成Mpt |
| | | function createMpt() { |
| | | ajax("TB/CreateMpt" + "?token=" + token + "&path=" + encodeURIComponent("D:\\LF\\data\\ANTU\\测绘(ESV)"), "GET", null, null, null, function (rs) { |
| | | ajax("TB/CreateMpt" + "?token=" + token + "&path=" + encodeURIComponent("D:\\LF\\data\\ANTU\\"), "GET", null, null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | |
| | | // 结束任务 |
| | | function deleteTask() { |
| | | var data = { token: token, ids: [$("#taskId").val()], dircode: "00" }; |
| | | ajax("Convert/DeleteTask", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | </script> |
| | | </head> |
| | | <body> |
| | | <h2>出图测试</h2> |
| | | <h2>Toekn:<span id="token" style="font-size: 14px;"></span></h2> |
| | | <select id="selectPage"> |
| | | <option>A0</option> |
| | | <option>A1</option> |
| | |
| | | </select> |
| | | <input type="button" value="出图-1" onclick="exportMap1()" /> |
| | | <input type="button" value="出图-2" onclick="exportMap2()" /> |
| | | <a href="Convert/Test">Test</a> |
| | | <br /><br /> |
| | | |
| | | <input type="button" value="测试切图" onclick="convertXYZ();" /> |
| | |
| | | <input type="button" value="测试SG" onclick="toSG();" /> |
| | | <input type="button" value="测试Terra" onclick="toTerra();" /> |
| | | <input type="button" value="测试OSGB" onclick="toOsgb();" /> |
| | | <input type="button" value="LasByPy" onclick="toLasByPy();" /> |
| | | <input type="button" value="测试Las" onclick="toLas();" /> |
| | | <input type="button" value="测试Laz" onclick="toLaz();" /> |
| | | <input type="button" value="生成Mpt" onclick="createMpt();" /> |
| | | <br /><br /> |
| | | |
| | | <input type="button" value="读取Las坐标系" onclick="ReadLasCs();" /> |
| | | <input id="taskId" value="0" /> |
| | | <input type="button" value="结束任务" onclick="deleteTask();" /> |
| | | </body> |
| | | </html> |