原创文章,转载请注明出处!http://blog.csdn.net/songhfu
空间查询关联属性表,并查询空间表和关联表字段示例代码如下:
/*
* 关联测试成功代码
* */
var joinItem=new SuperMap.REST.JoinItem({
foreignTableName: "V_ENABLEVIEW_LAND",
joinFilter: "BBS_PARCEL.CADASTRALNO = V_ENABLEVIEW_LAND.CADASTRALNO ",
joinType: "INNERJOIN"
});
var queryParam, queryByGeometryParameters, queryService;
queryParam = new SuperMap.REST.FilterParameter({
joinItems:[joinItem],
name: "BBS_PARCEL@grid_sysdb",
fields: [
"BBS_PARCEL.CADASTRALNO as CADASTRALNO",
"BBS_PARCEL.LANDUSER as LANDUSER",
"BBS_PARCEL.PARCELADDRESS as PARCELADDRESS",
"BBS_PARCEL.RIGHTSTYPE_CN as RIGHTSTYPE_CN",
"BBS_PARCEL.LANDPURPOSE_CN as LANDPURPOSE_CN",
"BBS_PARCEL.PLOTRATIO as PLOTRATIO",
"BBS_PARCEL.POSTADDRESS as POSTADDRESS",
"BBS_PARCEL.BOOKAREA as BOOKAREA",
"BBS_PARCEL.REALAREA as REALAREA",
"
V_ENABLEVIEW_LAND.FJBM as FJBM"],
displayFilters:["V_ENABLEVIEW_LAND.FJBM='"+_disCode +"' or V_ENABLEVIEW_LAND.FJBM is null "]
});
queryByGeometryParameters = new SuperMap.REST.QueryByGeometryParameters({
queryParams: [queryParam],
geometry: feature.geometry,
spatialQueryMode: SuperMap.REST.SpatialQueryMode.INTERSECT
});