Methods
evaluate(feature, result) → {Boolean|Number|String|RegExp|Cartesian2|Cartesian3|Cartesian4|Color}
計算表達式的結果,可以選擇使用提供的功能的屬性。如果3D Tiles Styling language中表達式的結果屬于
Boolean
、Number
或String
類型,則返回相應的javascript基元類型。如果結果是RegExp
,將返回一個javascriptRegExp
對象。如果結果是Cartesian2
、Cartesian3
或Cartesian4
,則返回Cartesian2
、Cartesian3
或Cartesian4
對象。如果result
參數是Color
,則Cartesian4
值將轉換為Color
,然后返回。
Parameters:
result
(Object)
存儲結果的對象。
使用提供的功能的屬性(可選)計算顏色表達式的結果。
這相當于StyleExpression#evaluate
但始終返回Color
對象。