new JoinItem(options)
Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/openlayers/iclient-ol.js"></script>
<script>
  new ol.supermap.JoinItem(options);
  
  // 弃用的写法
  new SuperMap.JoinItem(options);
</script>
// ES6 Import
import { JoinItem } from '@supermap/iclient-ol';
new JoinItem(options);
        
        
        | Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| options | Object | 参数。 
 | 
Example
下面以 SQL 查询说明 joinItem 的使用方法:
(start code)
  function queryBySQL() {
      // 设置与外部表的连接信息
      var joinItem = new JoinItem({
          foreignTableName: "foreignTable",
          joinFilter: "foreignTable.CONTINENT = Countries.CONTINENT",
          joinType: "LEFTJOIN"
      })
      var queryParam, queryBySQLParams, queryBySQLService;
      // 设置查询参数,在查询参数中添加joinItem关联条件信息
      queryParam = new FilterParameter({
           name: "Countries@World",
           joinItems: [joinItem]
        }),
      queryBySQLParams = new QueryBySQLParameters({
            queryParams: [queryParam]
        }),
      queryBySQLService = new QueryBySQLService(url, {
            eventListeners: { "processCompleted": processCompleted, "processFailed": processFailed}
        });
      queryBySQLService.processAsync(queryBySQLParams);
 }
 function processCompleted(queryEventArgs) {//todo}
 function processFailed(e) {//todo}
(end)Members
- 
    foreignTableNamestring
- 
    
    外部表的名称。 如果外部表的名称是以 “表名@数据源名” 命名方式,则该属性只需赋值表名。 例如:外部表 Name@changchun,Name 为表名,changchun 为数据源名称,则该属性的赋值应为:Name。 
- 
    joinFilterstring
- 
    
    矢量数据集与外部表之间的连接表达式,即设定两个表之间关联的字段。 例如,将房屋面数据集(Building)的 district 字段与房屋拥有者的纯属性数据集(Owner)的 region 字段相连接, 两个数据集对应的表名称分别为 Table_Building 和 Table_Owner, 则连接表达式为 Table_Building.district = Table_Owner.region。 当有多个字段相连接时,用 AND 将多个表达式相连。 
- 
    joinTypeJoinType
- 
    
    两个表之间连接类型。 连接类型决定了对两个表进行连接查询后返回的记录的情况。 
Methods
- 
    destroy()common/iServer/JoinItem.js, line 84
- 
    
    释放资源,将引用资源的属性置空。 
- 
    toServerJSONObject()common/iServer/JoinItem.js, line 95
- 
    
    转换成对应的 JSON 格式对象。