AnsweredAssumed Answered

Does VectorTileLayer support data-driven styles?

Question asked by laolai on Oct 5, 2018
Latest reply on Oct 12, 2018 by xing.zhang_Innovyze

Hello,

I was reading the ArcGIS API for JavaScript version 4.9 documentation and have some questions.

Documentation details:
Page title: VectorTileLayer | API Reference | ArcGIS API for JavaScript 4.9
Page URL: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html

Does VectorTileLayer support data-driven styles? I want to set line color based on the values of “pipelength” property.

I try two ways as  following, but neither works. Does ESRI have some specific format for VectorTileLayer data-driven style?

          'line-color': {

            "property": "pipelength",

            "stops": [

              [500, '#51bbd6'],

              [1000, '#f28cb1']

            ]

          }

 

          'line-color': [

            "step",

            ["get", "pipelength"],

            "#51bbd6",

            500,

            "#f1f075",

            1000,

            "#f28cb1"

          ]

Outcomes