管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-09-03 3cfb6aa02516135fb174ab1b30620f2007924663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>MoonExp</title>
  <meta http-equiv="Expires" content="0" />
  <meta http-equiv="Cache" content="no-cache" />
  <meta http-equiv="Pragma" content="no-cache" />
  <meta http-equiv="Cache-control" content="no-cache" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <script src="js/jquery.1.12.4.js"></script>
  <script>
    var token = "92255639-2e64-4095-bc75-6ce2ded45fdc";
 
    $(function () {
      $("#token").html(token);
    });
 
    // Ajax
    function ajax(url, type, data, dataType, contentType, fn) {
      $.ajax({
        url: url,
        type: type,
        data: data,
        dataType: dataType || "json", // html、json、jsonp、script、text
        contentType: contentType || "application/json", // "application/x-www-form-urlencoded"
        success: function (data) {
          fn(data);
        },
        error: function (e) {
          console.error(e);
          fn();
        }
      });
    }
 
    // 出图-1
    function exportMap1() {
      var page = $("#selectPage").find("option:selected").text();
      var data = {
        token: token,
        title: "SmartEarth三维地理信息系统平台V7.0",
        pageSize: page,
        province: "北京市",
        scale: "1:5万",
        resolution: "5米",
        date: "2023.10.12",
        layers: "m_hydraulic_protection,m_marker,m_pipeline,m_sitepoint,m_valvehousepoint,m_crossing",
        rotation: 0,
        xmin: 103.394023,
        ymin: 30.690466,
        ymax: 37.871048,
        xmax: 112.534648,
        //wmtsUrl: "http://219.153.49.10:7511/sj_raster/v6/wmts/service/system/10000201/1?ak=mf72ff9295c740ec0f37e61433e8a3ad8d"
        layerIds: [87]
      };
 
      ajax("Export/Start", "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>Toekn:<span id="token" style="font-size: 14px;"></span></h2>
  <select id="selectPage">
    <option>A0</option>
    <option>A1</option>
    <option>A2</option>
    <option>A3</option>
    <option selected="selected">A4</option>
  </select>
  <input type="button" value="出图-1" onclick="exportMap1()" />
  <a href="Export/Test">Test</a>
  <br /><br />
</body>
</html>