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]
}),
效果图:
//关联关系
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]
}),
相关文章推荐
- SuperMap iClient for JavaScript查询过滤条件构建
- Supermap iserver client 空间查询关联属性过滤示例
- supermap自写方法,仅供初学者参考(一) 外部数据关联生成专题图的方法(C#版)
- Hive&SqlServerql:inner join on条件中如果两边都是空值的情况下,关联结果中会把数据给过滤掉。
- 使用超图SuperMap制作气象类专题图全攻略(一)
- 关于使用AE进行图层与oracle外表连接制作专题图的一些问题
- Mysql命令-以NULL做where条件过滤时应该写 IS NULL;
- 工作框架各种使用整理 -- 自己处理分页且输入条件中有过滤条件
- 过滤条件,下拉条的形式!!的插件
- httpclient和lua和c++的关联
- 【Android 开发教程】条件查询、过滤和排序
- Client(客户端)测试专题技术
- ORACLE几个过滤条件的执行顺序
- Discuz X 多页面专题制作教程
- 一站式学习Wireshark(八):应用Wireshark过滤条件抓取特定数据流
- DetachedCriteria 实现多表关联,检索条件
- NSPredicate 条件过滤
- [4] DevOps 自动化运维工具Chef----在Ubuntu上安装最新的Chef Client 12.13.37 并和Chef server关联起来
- mysql 数据条件过滤查询练习
- Hibernate多对多关联映射的HQL中的in条件查询问题