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
            }
          });
  • 相关阅读:
    maven引入tomcat插件
    Maven更新jdk1.7
    ehcashe
    response的json
    ajax
    180411
    清空select标签中option选项
    jackson
    ajax
    mysql主从
  • 原文地址:https://www.cnblogs.com/leebokeyuan/p/12193046.html
Copyright © 2011-2022 走看看