1             let url = "https://xxx.arcgis.com/arcgis/rest/services/line_0706_3857/FeatureServer/0"; //此处为地址样式,不是完整的地址,请填写服务的完整地址。
 2                         
 3             var LineLayer = esri.featureLayer({
 4                 url: url,
 5                 style: function (feature) {
 6                     var c = '#007D7D';;
 7                     var o = 0.95;
 8                     let width = 3;
 9                     let gj = feature.properties.lineGJ;
10 
11                     if (gj > 0 && gj < 201) {
12                         width = 3
13                     } else if (gj < 200 && gj < 401) {
14                         width = 5;
15                     } else if (gj > 400) {
16                         width = 7;
17                     }
18 
19                     return { color: c, opacity: o, weight: width };
20                 }
21             }).addTo(map);

 

 

相关文章:

  • 2021-09-29
  • 2021-06-01
  • 2021-07-11
  • 2021-06-03
  • 2022-12-23
  • 2021-06-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案