new LinkItem(options)
Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
  new L.supermap.LinkItem(options);
  
  // 弃用的写法
  new SuperMap.LinkItem(options);
</script>
// ES6 Import
import { LinkItem } from '@supermap/iclient-leaflet';
new LinkItem(options);
        
        
        
            common/iServer/LinkItem.js, line 7
        
        
    | Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| options | Object | 参数。 
 | 
Example
下面以 SQL 查询说明 linkitem 的使用方法:
 function queryBySQL() {
     // 设置关联的外部数据库信息,alias表示数据库别名
     var dc = new DatasourceConnectionInfo({
         dataBase: "RelQuery",
         server: "{ip}:{port}",
         user: "sa",
         password: "map",
         driver: "SQL Server",
         connect: true,
         OpenLinkTable: false,
         alias: "RelQuery",
         engineType: EngineType.SQLPLUS,
         readOnly: false,
         exclusive: false
     });
    // 设置关联信息
     var linkItem = new LinkItem({
         datasourceConnectionInfo: dc,
         foreignKeys: ["name"],
         foreignTable: "Pop_2011",
         linkFields: ["SmID as Pid","pop"],
         name: "link",
         primatryKeys: ["name"],
     });
     // 设置查询参数,在查询参数中添加linkItem关联条件信息
     var queryParam, queryBySQLParams, queryBySQLService;
     queryParam = new FilterParameter({
         name: "Province@RelQuery",
         fields: ["SmID","name"],
         attributeFilter: "SmID<7",
         linkItems: [linkItem]
      }),
     queryBySQLParams = new QueryBySQLParameters({
          queryParams: [queryParam]
             }),
     queryBySQLService = new QueryBySQLService(url);
     queryBySQLService.processAsync(queryBySQLParams);
 }
 function processCompleted(queryEventArgs) {//todo}
 function processFailed(e) {//todo}Members
- 
    datasourceConnectionInfoDatasourceConnectionInfo
- 
    
    关联的外部数据源信息。 
- 
    foreignKeysArray.<string>
- 
    
    主空间数据集的外键。 
- 
    foreignTablestring
- 
    
    关联的外部属性表的名称,目前仅支持 Supermap 管理的表,即另一个矢量数据集所对应的 DBMS 表。 
- 
    linkFieldsArray.<string>
- 
    
    欲保留的外部属性表的字段。如果不设置字段或者设置的字段在外部属性表中不存在的话则不返回任何外部属性表的属性信息。如果欲保留的外部表字段与主表字段存在同名,则还需要指定一个不存在字段名作为外部表的字段别名。 
- 
    linkFilterstring
- 
    
    与外部属性表的连接条件。 
- 
    namestring
- 
    
    此关联信息对象的名称。 
- 
    primaryKeysArray.<string>
- 
    
    需要关联的外部属性表的主键。 
Methods
- 
    destroy()common/iServer/LinkItem.js, line 123
- 
    
    释放资源,将引用资源的属性置空。