forked from MapGIS/WebClient-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVectCls.js
More file actions
85 lines (77 loc) · 2.48 KB
/
VectCls.js
File metadata and controls
85 lines (77 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import {
Zondy
} from './Base';
import {
extend
} from "./Util";
import {
VectClsType
} from "./EnumComm";
import {
FeatureType
} from "./EnumComm";
import {
CAttStruct
} from "./CAttStruct";
/**
* 矢量类对象
* @class Zondy.Object.VectCls
* @classdesc 矢量类对象
* @param {Object} option 属性键值对
* @param {VectClsType} [option.clsType = VectClsType.SFCls] 图层类型 Zondy.Enum.VectClsType
* @param {String} [option.clsName = null] 图层名称
* @param {FeatureType} [option.geoType = 1] 要素几何类型 Zondy.Enum.FeatureType类型,只对简单要素类有效
* @param {String} [option.srefName = ""] 空间参照系名称
* @param {String} [option.dsName = ""] 要素数据集名称
* @param {Zondy.Object.CAttStruct} [option.attStruct = null] 图层属性结构对象
*/
var VectCls = function (option) {
var options = (option !== undefined) ? option : {};
extend(this, options);
/**
* @member Zondy.Object.VectCls.prototype.clsType
* @type {VectClsType}
* @description 图层类型 Zondy.Enum.VectClsType
* @default VectClsType.SFCls
*/
this.clsType = (options.clsType !== undefined) ? options.clsType : VectClsType.SFCls;
/**
* @member Zondy.Object.VectCls.prototype.clsName
* @type {String}
* @description 图层名称
* @default null
*/
this.clsName = (options.clsName !== undefined) ? options.clsName : null;
/**
* @member Zondy.Object.VectCls.prototype.geoType
* @type {FeatureType}
* @description 要素几何类型 Zondy.Enum.FeatureType 类型,只对简单要素类有效
* @default 1
*/
this.geoType = (options.geoType !== undefined) ? options.geoType : 1;
/**
* @member Zondy.Object.VectCls.prototype.srefName
* @type {String}
* @description 空间参照系名称
* @default ""
*/
this.srefName = (options.srefName !== undefined) ? encodeURI(options.srefName) : "";
/**
* @member Zondy.Object.VectCls.prototype.dsName
* @type {String}
* @description 要素数据集名称
* @default ""
*/
this.dsName = (options.dsName !== undefined) ? encodeURI(options.dsName) : "";
/**
* @member Zondy.Object.VectCls.prototype.attStruct
* @type {Zondy.Object.CAttStruct}
* @description 图层属性结构对象
* @default null
*/
this.attStruct = (options.attStruct !== undefined) ? options.attStruct : null;
};
export {
VectCls
};
Zondy.Object.VectCls = VectCls;