BM3DTileStyle

应用于BM3DTileset的样式。

计算使用3D Tiles Styling language定义的表达式。

new BM3DTileStyle(style)
Parameters:
style ((Resource | String | Object)) 定义样式的样式或对象的URL。
Examples
tileset.style = new bmgl.BM3DTileStyle({
    color : {
        conditions : [
            ['${Height} >= 100', 'color("purple", 0.5)'],
            ['${Height} >= 50', 'color("red")'],
            ['true', 'color("blue")']
        ]
    },
    show : '${Height} > 0',
    meta : {
        description : '"Building id ${id} has height ${Height}."'
    }
});
tileset.style = new bmgl.BM3DTileStyle({
    color : 'vec4(${Temperature})',
    pointSize : '${Temperature} * 2.0'
});
See:

Members

anchorLineColor : StyleExpression

获取或设置用于计算样式的anchorLineColor属性的StyleExpression对象。或者,可以使用定义颜色样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Color

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new bmgl.BM3DTileStyle();
// Override anchorLineColor expression with a string
style.anchorLineColor = 'color("blue")';
var style = new bmgl.BM3DTileStyle();
// Override anchorLineColor expression with a condition
style.anchorLineColor = {
    conditions : [
        ['${height} > 2', 'color("cyan")'],
        ['true', 'color("blue")']
    ]
};

anchorLineEnabled : StyleExpression

获取或设置用于计算样式的anchorLineEnabled属性的StyleExpression对象。或者,可以使用定义布尔样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Boolean

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new bmgl.BM3DTileStyle();
// Override anchorLineEnabled expression with a string
style.anchorLineEnabled = 'true';
var style = new bmgl.BM3DTileStyle();
// Override anchorLineEnabled expression with a condition
style.anchorLineEnabled = {
    conditions : [
        ['${height} > 2', 'true'],
        ['true', 'false']
    ]
};

backgroundColor : StyleExpression

获取或设置用于计算样式的backgroundColor属性的StyleExpression对象。或者,可以使用定义颜色样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Color

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new bmgl.BM3DTileStyle();
// Override backgroundColor expression with a string
style.backgroundColor = 'color("blue")';
var style = new bmgl.BM3DTileStyle();
// Override backgroundColor expression with a condition
style.backgroundColor = {
    conditions : [
        ['${height} > 2', 'color("cyan")'],
        ['true', 'color("blue")']
    ]
};

backgroundEnabled : StyleExpression

获取或设置用于计算样式的backgroundEnabled属性的StyleExpression对象。或者,可以使用定义布尔样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Boolean

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new bmgl.BM3DTileStyle();
// Override backgroundEnabled expression with a string
style.backgroundEnabled = 'true';
var style = new bmgl.BM3DTileStyle();
// Override backgroundEnabled expression with a condition
style.backgroundEnabled = {
    conditions : [
        ['${height} > 2', 'true'],
        ['true', 'false']
    ]
};

backgroundPadding : StyleExpression

获取或设置用于计算样式的backgroundPadding属性的StyleExpression对象。或者,可以使用定义vec2样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Cartesian2

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Example:
var style = new bmgl.BM3DTileStyle();
// Override backgroundPadding expression with a string
style.backgroundPadding = 'vec2(5.0, 7.0)';
style.backgroundPadding.evaluate(feature); // returns a Cartesian2

color : StyleExpression

获取或设置用于计算样式的color属性的StyleExpression对象。或者,可以使用定义颜色样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Color

此表达式适用于所有瓦片格式。

Examples:
var style = new BM3DTileStyle({
    color : '(${Temperature} > 90) ? color("red") : color("white")'
});
style.color.evaluateColor(feature, result); // returns a bmgl.Color object
var style = new bmgl.BM3DTileStyle();
// Override color expression with a custom function
style.color = {
    evaluateColor : function(feature, result) {
        return bmgl.Color.clone(bmgl.Color.WHITE, result);
    }
};
var style = new bmgl.BM3DTileStyle();
// Override color expression with a string
style.color = 'color("blue")';
var style = new bmgl.BM3DTileStyle();
// Override color expression with a condition
style.color = {
    conditions : [
        ['${height} > 2', 'color("cyan")'],
        ['true', 'color("blue")']
    ]
};

disableDepthTestDistance : StyleExpression

获取或设置用于计算样式的disableDepthTestDistance属性的StyleExpression对象。或者,可以使用定义数字样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Number

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Example:
var style = new bmgl.BM3DTileStyle();
// Override disableDepthTestDistance expression with a string
style.disableDepthTestDistance = '1000.0';
style.disableDepthTestDistance.evaluate(feature); // returns a Number

distanceDisplayCondition : StyleExpression

获取或设置用于计算样式的distanceDisplayCondition属性的StyleExpression对象。或者,可以使用定义vec2样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Cartesian2

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Example:
var style = new bmgl.BM3DTileStyle();
// Override distanceDisplayCondition expression with a string
style.distanceDisplayCondition = 'vec2(0.0, 5.5e6)';
style.distanceDisplayCondition.evaluate(feature); // returns a Cartesian2

font : StyleExpression

获取或设置用于计算样式的font属性的StyleExpression对象。或者,可以使用定义字符串样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回String

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new BM3DTileStyle({
    font : '(${Temperature} > 90) ? "30px Helvetica" : "24px Helvetica"'
});
style.font.evaluate(feature); // returns a String
var style = new bmgl.BM3DTileStyle();
// Override font expression with a custom function
style.font = {
    evaluate : function(feature) {
        return '24px Helvetica';
    }
};

heightOffset : StyleExpression

获取或设置用于计算样式的heightOffset属性的StyleExpression对象。或者,可以使用定义数字样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Number

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new bmgl.BM3DTileStyle();
// Override heightOffset expression with a string
style.heightOffset = '2.0';
var style = new bmgl.BM3DTileStyle();
// Override heightOffset expression with a condition
style.heightOffset = {
    conditions : [
        ['${height} > 2', '4.0'],
        ['true', '2.0']
    ]
};

horizontalOrigin : StyleExpression

获取或设置用于计算样式的horizontalOrigin属性的StyleExpression对象。或者,可以使用定义数字样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回HorizontalOrigin

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new BM3DTileStyle({
    horizontalOrigin : HorizontalOrigin.LEFT
});
style.horizontalOrigin.evaluate(feature); // returns a HorizontalOrigin
var style = new bmgl.BM3DTileStyle();
// Override horizontalOrigin expression with a custom function
style.horizontalOrigin = {
    evaluate : function(feature) {
        return HorizontalOrigin.CENTER;
    }
};

image : StyleExpression

获取或设置用于计算样式的image属性的StyleExpression对象。或者,可以使用定义字符串样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回String

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new BM3DTileStyle({
    image : '(${Temperature} > 90) ? "/url/to/image1" : "/url/to/image2"'
});
style.image.evaluate(feature); // returns a String
var style = new bmgl.BM3DTileStyle();
// Override image expression with a custom function
style.image = {
    evaluate : function(feature) {
        return '/url/to/image';
    }
};

labelColor : StyleExpression

获取或设置用于计算样式的labelColor属性的StyleExpression对象。或者,可以使用定义颜色样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Color

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new bmgl.BM3DTileStyle();
// Override labelColor expression with a string
style.labelColor = 'color("blue")';
var style = new bmgl.BM3DTileStyle();
// Override labelColor expression with a condition
style.labelColor = {
    conditions : [
        ['${height} > 2', 'color("cyan")'],
        ['true', 'color("blue")']
    ]
};

labelHorizontalOrigin : StyleExpression

获取或设置用于计算样式的labelHorizontalOrigin属性的StyleExpression对象。或者,可以使用定义数字样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回HorizontalOrigin

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new BM3DTileStyle({
    labelHorizontalOrigin : HorizontalOrigin.LEFT
});
style.labelHorizontalOrigin.evaluate(feature); // returns a HorizontalOrigin
var style = new bmgl.BM3DTileStyle();
// Override labelHorizontalOrigin expression with a custom function
style.labelHorizontalOrigin = {
    evaluate : function(feature) {
        return HorizontalOrigin.CENTER;
    }
};

labelOutlineColor : StyleExpression

获取或设置用于计算样式的labelOutlineColor属性的StyleExpression对象。或者,可以使用定义颜色样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Color

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new bmgl.BM3DTileStyle();
// Override labelOutlineColor expression with a string
style.labelOutlineColor = 'color("blue")';
var style = new bmgl.BM3DTileStyle();
// Override labelOutlineColor expression with a condition
style.labelOutlineColor = {
    conditions : [
        ['${height} > 2', 'color("cyan")'],
        ['true', 'color("blue")']
    ]
};

labelOutlineWidth : StyleExpression

获取或设置用于计算样式的labelOutlineWidth属性的StyleExpression对象。或者,可以使用定义数字样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Number

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new bmgl.BM3DTileStyle();
// Override labelOutlineWidth expression with a string
style.labelOutlineWidth = '5';
var style = new bmgl.BM3DTileStyle();
// Override labelOutlineWidth expression with a condition
style.labelOutlineWidth = {
    conditions : [
        ['${height} > 2', '5'],
        ['true', '0']
    ]
};

labelStyle : StyleExpression

获取或设置用于计算样式的label style属性的StyleExpression对象。或者,可以使用定义数字样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回LabelStyle

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new BM3DTileStyle({
    labelStyle : '(${Temperature} > 90) ? ' + LabelStyle.FILL_AND_OUTLINE + ' : ' + LabelStyle.FILL
});
style.labelStyle.evaluate(feature); // returns a LabelStyle
var style = new bmgl.BM3DTileStyle();
// Override labelStyle expression with a custom function
style.labelStyle = {
    evaluate : function(feature) {
        return LabelStyle.FILL;
    }
};

labelText : StyleExpression

获取或设置用于计算样式的labelText属性的StyleExpression对象。或者,可以使用定义字符串样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回String

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new BM3DTileStyle({
    labelText : '(${Temperature} > 90) ? ">90" : "<=90"'
});
style.labelText.evaluate(feature); // returns a String
var style = new bmgl.BM3DTileStyle();
// Override labelText expression with a custom function
style.labelText = {
    evaluate : function(feature) {
        return 'Example label text';
    }
};

labelVerticalOrigin : StyleExpression

获取或设置用于计算样式的labelVerticalOrigin属性的StyleExpression对象。或者,可以使用定义数字样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回VerticalOrigin

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new BM3DTileStyle({
    labelVerticalOrigin : VerticalOrigin.TOP
});
style.labelVerticalOrigin.evaluate(feature); // returns a VerticalOrigin
var style = new bmgl.BM3DTileStyle();
// Override labelVerticalOrigin expression with a custom function
style.labelVerticalOrigin = {
    evaluate : function(feature) {
        return VerticalOrigin.CENTER;
    }
};

meta : StyleExpression

获取或设置包含可显式计算的特定于应用程序的表达式的对象,例如,用于在UI中显示。
Example:
var style = new BM3DTileStyle({
    meta : {
        description : '"Building id ${id} has height ${Height}."'
    }
});
style.meta.description.evaluate(feature); // returns a String with the substituted variables

pointOutlineColor : StyleExpression

获取或设置用于计算样式的pointOutlineColor属性的StyleExpression对象。或者,可以使用定义颜色样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Color

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new bmgl.BM3DTileStyle();
// Override pointOutlineColor expression with a string
style.pointOutlineColor = 'color("blue")';
var style = new bmgl.BM3DTileStyle();
// Override pointOutlineColor expression with a condition
style.pointOutlineColor = {
    conditions : [
        ['${height} > 2', 'color("cyan")'],
        ['true', 'color("blue")']
    ]
};

pointOutlineWidth : StyleExpression

获取或设置用于计算样式的pointOutlineWidth属性的StyleExpression对象。或者,可以使用定义数字样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Number

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new bmgl.BM3DTileStyle();
// Override pointOutlineWidth expression with a string
style.pointOutlineWidth = '5';
var style = new bmgl.BM3DTileStyle();
// Override pointOutlineWidth expression with a condition
style.pointOutlineWidth = {
    conditions : [
        ['${height} > 2', '5'],
        ['true', '0']
    ]
};

pointSize : StyleExpression

获取或设置用于计算样式的pointSize属性的StyleExpression对象。或者,可以使用定义点大小样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Number

此表达式仅适用于矢量瓦片或点云瓦片中的点特征。

Examples:
var style = new BM3DTileStyle({
    pointSize : '(${Temperature} > 90) ? 2.0 : 1.0'
});
style.pointSize.evaluate(feature); // returns a Number
var style = new bmgl.BM3DTileStyle();
// Override pointSize expression with a custom function
style.pointSize = {
    evaluate : function(feature) {
        return 1.0;
    }
};
var style = new bmgl.BM3DTileStyle();
// Override pointSize expression with a number
style.pointSize = 1.0;
var style = new bmgl.BM3DTileStyle();
// Override pointSize expression with a string
style.pointSize = '${height} / 10';
var style = new bmgl.BM3DTileStyle();
// Override pointSize expression with a condition
style.pointSize =  {
    conditions : [
        ['${height} > 2', '1.0'],
        ['true', '2.0']
    ]
};

(readonly) ready : Boolean

true时,样式已就绪,可以计算其表达式。当使用对象构建样式时,与URL相反,这是true立即。
Default Value: false

(readonly) readyPromise : Promise.<BM3DTileStyle>

获取当样式就绪并且可以计算其表达式时将解决的承诺。

scaleByDistance : StyleExpression

获取或设置用于计算样式的scaleByDistance属性的StyleExpression对象。或者,可以使用定义vec4样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Cartesian4

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Example:
var style = new bmgl.BM3DTileStyle();
// Override scaleByDistance expression with a string
style.scaleByDistance = 'vec4(1.5e2, 2.0, 1.5e7, 0.5)';
style.scaleByDistance.evaluate(feature); // returns a Cartesian4

show : StyleExpression

获取或设置用于计算样式的show属性的StyleExpression对象。或者,可以使用定义显示样式的布尔值、字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回或转换为Boolean

此表达式适用于所有瓦片格式。

Examples:
var style = new BM3DTileStyle({
    show : '(regExp("^Chest").test(${County})) && (${YearBuilt} >= 1970)'
});
style.show.evaluate(feature); // returns true or false depending on the feature's properties
var style = new bmgl.BM3DTileStyle();
// Override show expression with a custom function
style.show = {
    evaluate : function(feature) {
        return true;
    }
};
var style = new bmgl.BM3DTileStyle();
// Override show expression with a boolean
style.show = true;
};
var style = new bmgl.BM3DTileStyle();
// Override show expression with a string
style.show = '${Height} > 0';
};
var style = new bmgl.BM3DTileStyle();
// Override show expression with a condition
style.show = {
    conditions: [
        ['${height} > 2', 'false'],
        ['true', 'true']
    ];
};

(readonly) style : Object

获取使用3D Tiles Styling language定义样式的对象。
Default Value: {}

translucencyByDistance : StyleExpression

获取或设置用于计算样式的translucencyByDistance属性的StyleExpression对象。或者,可以使用定义vec4样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回Cartesian4

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Example:
var style = new bmgl.BM3DTileStyle();
// Override translucencyByDistance expression with a string
style.translucencyByDistance = 'vec4(1.5e2, 1.0, 1.5e7, 0.2)';
style.translucencyByDistance.evaluate(feature); // returns a Cartesian4

verticalOrigin : StyleExpression

获取或设置用于计算样式的verticalOrigin属性的StyleExpression对象。或者,可以使用定义数字样式的字符串或对象。getter将返回内部ExpressionConditionsExpression,这可能与提供给setter的值不同。

表达式必须返回VerticalOrigin

此表达式仅适用于矢量瓦片中的点特征。

Experimental

This feature is using part of the 3D Tiles spec that is not final and is subject to change without bigemap-gl's standard deprecation policy.

Examples:
var style = new BM3DTileStyle({
    verticalOrigin : VerticalOrigin.TOP
});
style.verticalOrigin.evaluate(feature); // returns a VerticalOrigin
var style = new bmgl.BM3DTileStyle();
// Override verticalOrigin expression with a custom function
style.verticalOrigin = {
    evaluate : function(feature) {
        return VerticalOrigin.CENTER;
    }
};