The previous topic diagram only associates with the External table and does not filter data based on Attribute conditions. There is no better sample program on the Internet, so I have crashed the iServer several times, the following are the key code for success.
:
// Link
VaR joinitem = new Supermap. Rest. joinitem ({
Foreigntablename: "v_region_land ",
Joinfilter: "bbs_parcel.cadastralno = v_region_land.cadastralno ",
Jointype: "innerjoin"
});
// Single-value style
VaR themeuniqueiteme30 = new Supermap. Rest. themeuniqueitem ({
Unique: _ discode, // specific field value of a single value
Style: style1
});
Themeunique2 = new Supermap. Rest. themeunique ({
Uniqueexpression: "v_region_land.fjbm", // single-Value Comparison Field
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
})
}),
// Topic Map parameter object
Themeparameters = new Supermap. Rest. themeparameters ({
Themes: [themeunique2],
Displayfilters: ["v_region_land.fjbm =" + _ discode], // filter is effective here-core code
Datasourcenames: ["grid_sysdb"],
Datasetnames: ["bbs_parcel"],
Joinitems: [joinitem]
}),
Create a Supermap iclient Topic map, associate the External table, and filter by conditions