当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


JavaScript ArcGIS Print.exportedLinks用法及代码示例


基本信息

以下是所在类或对象的基本信息。

AMD: require(["esri/widgets/Print"], (Print) => { /* code goes here */ });

ESM: import Print from "@arcgis/core/widgets/Print";

类: esri/widgets/Print

继承: Print > Widget > Accessor

自从:用于 JavaScript 4.2 的 ArcGIS API

用法说明

Print.exportedLinks函数(或属性)的定义如下:


自从:ArcGIS 适用于 JavaScript 4.17 的 API

从“打印”小部件导出的链接集合。

例子:

require([
  "esri/widgets/Print",
  "esri/config"
], function(Print, esriConfig) {

  // ...

  view.when(function () {
    print = new Print({
      view: view,
      // specify your own print service
      printServiceUrl:
        "https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
    });

    // Add widget to the top right corner of the view
    view.ui.add(print, "top-right");

    // use a requestInterceptor to monitor the print widget
    // for print completion
    esriConfig.request.interceptors.push({
      // set the `urls` property to the URL of the print service so that this
      // interceptor only applies to requests made to the print service URL
      urls: print.printServiceUrl,
      // use the AfterInterceptorCallback to interogate the exportedLinks property
      after: function(response) {
        console.log("exportedLinks: ", print.exportedLinks.items[0]);
      }
    });
  });

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 Print.exportedLinks。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。