您的位置:首页 > 其它

Supermap iclient 专题图制作,关联外表,并条件过滤

2014-09-16 11:39 344 查看
之前做的专题图只是关联外表,并没有根据属性条件过滤数据,网上也没有更好的示例程序,自己捣鼓了几次iserver搞崩溃了,以下是搞成功的关键代码留存备用。

效果图:



//关联关系

var joinItem=new SuperMap.REST.JoinItem({

foreignTableName: "V_REGION_LAND",

joinFilter: "BBS_PARCEL.CADASTRALNO = V_REGION_LAND.CADASTRALNO ",

joinType: "INNERJOIN"

});

//单值样式

var themeUniqueIteme30 = new SuperMap.REST.ThemeUniqueItem({

unique:_disCode,//单值具体字段值

style: style1

});

themeUnique2 = new SuperMap.REST.ThemeUnique({

uniqueExpression: "V_REGION_LAND.FJBM",//单值对比字段

items: [themeUniqueIteme30],

defaultStyle: new SuperMap.REST.ServerStyle({

fillOpaqueRate:0,

fillForeColor: new SuperMap.REST.ServerColor(132, 164, 232),

lineColor: new SuperMap.REST.ServerColor(0,255,0),

lineWidth: 0.1

})

}),

//专题图参数对象

themeParameters = new SuperMap.REST.ThemeParameters({

themes: [themeUnique2],

displayFilters:["V_REGION_LAND.FJBM="+_disCode],//此处filter过滤有效---核心代码

dataSourceNames: ["grid_sysdb"],

datasetNames: ["BBS_PARCEL"],

joinItems:[joinItem]

}),
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: