new Logical()
- Source:
- View2D/Filter/Logical.js
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
//逻辑过滤器
var filter = new GeoGlobe.Filter.Logical({
type: GeoGlobe.Filter.Logical.AND,
filters: [
new GeoGlobe.Filter.Comparison({
type: GeoGlobe.Filter.Comparison.LIKE, //比较运算类型
property: "PCODE",//查询字段
value: "中餐馆" //字段值
}),
new GeoGlobe.Filter.Comparison({
type: GeoGlobe.Filter.Comparison.EQUAL_TO,
property: "OID",
value: "16"
}),
new GeoGlobe.Filter.Spatial({
type: GeoGlobe.Filter.Spatial.INTERSECTS, //空间过滤器的类型
property: "Geometry", //要素中几何属性的名称
value: GeoGlobe.Bounds.fromString(bbox), //查询范围
projection: "EPSG:4326" //空间参考
})
]
});
Members
-
type :String
-
逻辑运算符的类型。 可用的类型是: - GeoGlobe.Filter.Logical.AND = "&&"; - GeoGlobe.Filter.Logical.OR = "||"; - GeoGlobe.Filter.Logical.NOT = "!";
Type:
- String
- Source:
- View2D/Filter/Logical.js
Methods
-
clone()
-
复制这个过滤器。
- Source:
- View2D/Filter/Logical.js
Returns:
复制这个过滤器。 -
destroy()
-
删除对子过滤器的引用。
- Source:
- View2D/Filter/Logical.js
-
evaluate(context)
-
在特定的上下文中评估此过滤器。
Parameters:
Name Type Description context
Object 用于评估过滤器的上下文。 还可以提供矢量特征以评估比较过滤器或空间过滤器中的几何特征的特征属性。 - Source:
- View2D/Filter/Logical.js
Returns:
该过滤器适用。- Type
- Boolean
-
initialize(options)
-
创建一个逻辑过滤器(&&,||,!)。
Parameters:
Name Type Description options
Object 一个可选对象,可在过滤器上设置属性。 - Source:
- View2D/Filter/Logical.js
Returns: