zoukankan      html  css  js  c++  java
  • 在要素图层上设置属性

    可以在要素图层上设置其他属性,以更改其绘制和行为方式。definitionExpression设置为仅绘制海拔增益小于250英尺renderer的路径,a 将路径绘制为绿色,a popupTemplate将显示路径名称和弹出窗口中的所有字段。

          // Trails feature layer (lines)
          var trailsLayer = new FeatureLayer({
            url: "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trails/FeatureServer/0",
            //*** ADD ***//
            definitionExpression: "ELEV_GAIN < 250",
    
            //*** ADD ***//
            renderer: {
              type: "simple",
              symbol: {
                type: "simple-line",
                color: "green",
                 "2px"
              }
            },
    
            //*** ADD ***//
            outFields: ["TRL_NAME","ELEV_GAIN"],
    
            //*** ADD ***//
            popupTemplate: {  // Enable a popup
              title: "{TRL_NAME}", // Show attribute value
              content: "The trail elevation gain is {ELEV_GAIN} ft."  // Display text in pop-up
            }
          });
  • 相关阅读:
    递归
    排序算法的稳定性与复杂度总结
    二分查找
    希尔排序
    快速排序
    归并排序
    插入排序
    选择排序
    冒泡排序
    i2c_smbs 函数
  • 原文地址:https://www.cnblogs.com/leebokeyuan/p/12193046.html
Copyright © 2011-2022 走看看