Supermap iClient 空间查询关联外表表查询多表字段示例代码
来源:程序员人生 发布时间:2014-10-10 08:00:01 阅读次数:2998次
原创文章,转载请注明出处!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
});
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠