惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
I
InfoQ
A
About on SuperTechFans
GbyAI
GbyAI
宝玉的分享
宝玉的分享
爱范儿
爱范儿
博客园 - 【当耐特】
博客园 - 司徒正美
博客园 - 聂微东
P
Proofpoint News Feed
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
阮一峰的网络日志
阮一峰的网络日志
B
Blog RSS Feed
Jina AI
Jina AI
aimingoo的专栏
aimingoo的专栏
J
Java Code Geeks
博客园 - 叶小钗

博客园 - zhh

Cesium 河道形状 Cesium 实现 FlowMap Unity3D c# 使对象物体始终面向摄像机 Cesium For Unity Convert WGS84 to Earth Centered Earth Fixed 小流域设计洪水计算 cesium自定义st TerrainProviderEdit Redis Server监控数据采集 cesium添加过道corridor Cesium:entity闪烁(点、面以及billboard) CAS Client集群环境的Session问题及解决方案 不能退出登录 Client Server集群模式下session问题[转] quartz数据不完整导致不调度并且报错Couldn‘t store trigger arcgis popup关闭事件 arcgis 叠加图片 watch arcgis 叠加图片 三维地图3DGIS平台技术指标要求规划 Java – Get All Dates Between Two Dates 太阳方位角
arcgis 3.x 打印
zhh · 2022-07-16 · via 博客园 - zhh
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
    <title>Simple Map</title>
    <link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css">
    <style>
      html, body, #map {
        height: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
      }
      body {
        background-color: #FFF;
        overflow: hidden;
        font-family: "Trebuchet MS";
      }
    </style>
    <script src="http://js.arcgis.com/3.13/"></script>
    <script>
      var myMap;
      var urlToThePrintServer = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task";

      require(["esri/map", "dojo/domReady!"], function(Map) {
        myMap = new Map("map", {
          basemap: "topo",  //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
          center: [-122.45, 37.75], // longitude, latitude
          zoom: 13
        });
        myMap.on("load", function(map) {
          var extent = new esri.geometry.Extent(
              -620526.0922336339, 
              5993991.149960931, 
              108988.90572005256, 
              6293624.300838808, 
              myMap.spatialReference
          );

          myMap.setExtent(extent, true).then(function() {
            console.log('setExtend is finished');
            require([
                "esri/tasks/PrintTemplate",
                "esri/tasks/PrintParameters",
                "esri/tasks/PrintTask"
                ], function(
                  PrintTemplate,
                  PrintParameters,
                  PrintTask
                  ) {

              var template = new PrintTemplate();
              template.exportOptions = {
                  width : 500,
                  height : 500
              };
              template.format = 'jpg';
              template.layout = 'MAP_ONLY';

              var params = new PrintParameters();
              params.map = myMap;
              params.template = template;

              var printTask = new PrintTask(urlToThePrintServer);
              printTask.execute(params, function(response) {
                console.log("The printed document is at " + response.url);
                window.open(response.url);
              });
            });
          });
        });
      });
    </script>
  </head>

  <body>
    <div id="map"></div>
  </body>
</html>