zoukankan      html  css  js  c++  java
  • 功能(一):添加影像服务图层

    <!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 Image Service</title>
        <link rel="stylesheet" href="https://js.arcgis.com/3.20/esri/css/esri.css" />
    
        <style>
          html, body, #map { height: 100%; width: 100%; margin: 0; padding: 0; }
        </style>
    
        <script src="https://js.arcgis.com/3.20/"></script>
        <script>
          var map;
          require([
            "esri/map", "esri/layers/ArcGISImageServiceLayer", 
            "esri/layers/ImageServiceParameters", "dojo/parser", "dojo/domReady!"
          ], function(
            Map, ArcGISImageServiceLayer, 
            ImageServiceParameters, parser
          ) {
            parser.parse();
    
            map = new Map("map", {
              basemap: "topo",
              center: [-79.40, 43.64],
              zoom: 12
            });
    
            var params = new ImageServiceParameters();
            params.noData = 0;
            var imageServiceLayer = new ArcGISImageServiceLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer", {
              imageServiceParameters: params,
              opacity: 0.75
            });
            map.addLayer(imageServiceLayer);
          });
        </script>
      </head>
      
      <body>
        <div id="map"> </div>
      </body>
    
    </html>

  • 相关阅读:
    C语言运算符优先级
    【科创网0184】选小寿星
    结构体的基本使用
    10月18日的疑问
    【从简单开始】简单的A+B问题
    【从简单开始】五层小山
    【从简单开始】Hello World
    基本递归(3)求阶乘
    基本递归(2)汉诺塔
    基本递归(1)勒让德多项式
  • 原文地址:https://www.cnblogs.com/tinaluo/p/6999822.html
Copyright © 2011-2022 走看看