-
Notifications
You must be signed in to change notification settings - Fork 288
Expand file tree
/
Copy pathChartSettingS57.js
More file actions
265 lines (232 loc) · 11.1 KB
/
ChartSettingS57.js
File metadata and controls
265 lines (232 loc) · 11.1 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
/* Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
import {Util} from '../commontypes/Util';
import {ChartSetting} from './ChartSetting';
import {Unit, DisplayModeChart, ColourModeChart } from '../REST';
/**
* @class ChartSettingS57
* @deprecatedclass SuperMap.ChartSettingS57
* @category iServer Map Chart
* @classdesc S57海图显示参数设置类,继承自ChartSetting类。
* @version 12.1.0
* @param {Object} options - 参数。
* @param {DisplayModeChart} [options.displayModeChart=DisplayModeChart.STANDARD] - 海图显示模式。
* @param {ColourModeChart} [options.colourModeChart=ColourModeChart.DAY_BRIGHT] - 海图显示的颜色模式。
* @param {string} [options.displayTypeName="S52"] - 海图显示类型的名称,如 "S52"、"IENC"、"INT"。
* @param {string} [options.fontName="Arial"] - 海图上显示文本的字体名称。
* @param {boolean} [options.simplifiedMarker=true] - 是否使用简单海图符号。
* @param {boolean} [options.symbolizedAreaBoundary=false] - 是否使用符号化的区域边界。
* @param {boolean} [options.displayTextMessage=false] - 是否在海图上显示文本信息。
* @param {boolean} [options.displaySounding=false] - 是否显示水深点。
* @param {boolean} [options.minVisibleScaleEnabled=true] - 物标的最小可见比例尺是否有效。
* @param {boolean} [options.localizationDisplayText=false] - 是否对文本进行本地化显示。
* @param {boolean} [options.displayMetaObject=false] - 是否显示元物标。
* @param {boolean} [options.displayCellName=false] - 是否显示图幅编号。
* @param {boolean} [options.displaySafetyContourLabel=true] - 是否显示安全等深线标注。
* @param {boolean} [options.displayBorder=false] - 是否显示图幅边框。
* @param {number} [options.safetyContour=30.0] - 安全等深线。单位以 depthUnit 设置的水深单位为准。
* @param {number} [options.shallowContour=2.0] - 浅水等深线。单位以 depthUnit 设置的水深单位为准。
* @param {number} [options.deepContour=30.0] - 深水等深线。单位以 depthUnit 设置的水深单位为准。
* @param {number} [options.safetyDepth=30.0] - 安全水深值。单位以 depthUnit 设置的水深单位为准。
* @param {boolean} [options.displayOtherContourLabel=false] - 是否显示其他等深线标注,即安全水深线标注以外的标注。
* @param {boolean} [options.displayTwoShades=false] - 是否以两色模式显示水深面。
* @param {Unit} [options.depthUnit=Unit.METER] - 显示水深单位。目前仅支持DECIMETER、METER、FOOT。
* @param {number} [options.fontSize=10.0] - 图上文本显示字体的字号。
* @param {object} [options.displayableFeature] - 当前地图下所有物标类型是否可显示的对应关系。
* @param {object} [options.selectableFeature] - 当前地图下所有物标类型是否可选择的对应关系。
* @param {boolean} [options.textClipRegionEnabled=false] - 是否启用海图图层的文本显示裁剪区。
* @param {boolean} [options.displayLowAccurateMarker=true] - 是否显示低精度符号。
* @param {number} [options.displayScaleFactor] - 比例尺缩放。
* @param {object} [options.displayableAcronymClassify] - 物标分组是否可显示的对应关系。
* @param {number} [options.safetyContour=30.0] - 安全等深线。单位以 depthUnit 设置的水深单位为准。
* @param {number} [options.shallowContour=2.0] - 浅水等深线。单位以 depthUnit 设置的水深单位为准。
* @param {number} [options.deepContour=30.0] - 深水等深线。单位以 depthUnit 设置的水深单位为准。
* @param {number} [options.safetyDepth=30.0] - 安全水深值。单位以 depthUnit 设置的水深单位为准。
* @extends ChartSetting
*/
export class ChartSettingS57 extends ChartSetting {
constructor(options) {
super(options);
this.chartType = 'S57';
/**
* @member {string} [ChartSettingS57.prototype.colourModeChart=ColourModeChart.DAY_BRIGHT]
* @description 颜色模式,可选值:DAY_BRIGHT(白昼),DUSK(晨昏),NIGHT(夜晚)。
*/
this.colourModeChart = ColourModeChart.DAY_BRIGHT;
/**
* @member {string} [ChartSettingS57.prototype.depthUnit=Unit.METER]
* @description 水深单位,参考Unit类。
*/
this.depthUnit = Unit.METER;
/**
* @member {boolean} [ChartSettingS57.prototype.displayCellName=false]
* @description 是否显示图幅编号。
*/
this.displayCellName = false;
/**
* @member {boolean} [ChartSettingS57.prototype.displayLowAccurateMarker=true]
* @description 是否显示低精度编号。
*/
this.displayLowAccurateMarker = true;
/**
* @member {boolean} [ChartSettingS57.prototype.displayMetaObject=false]
* @description 是否显示元物标。
*/
this.displayMetaObject = false;
/**
* @member {string} [ChartSettingS57.prototype.displayModeChart=DisplayModeChart.STANDARD]
* @description 海图显示模式,可选值:BASIC(基本显示模式),OTHER(其他显示模式),STANDARD(标准显示模式)。
*/
this.displayModeChart = DisplayModeChart.STANDARD;
/**
* @member {boolean} [ChartSettingS57.prototype.displayOtherContourLabel=false]
* @description 是否显示其他等深线标注,即安全水深线标注以外的标注。
*/
this.displayOtherContourLabel = false;
/**
* @member {boolean} [ChartSettingS57.prototype.displaySafetyContourLabel=true]
* @description 是否显示安全水深线标注。
*/
this.displaySafetyContourLabel = true;
/**
* @member {boolean} [ChartSettingS57.prototype.displaySounding=false]
* @description 是否显示水深点。
*/
this.displaySounding = false;
/**
* @member {boolean} [ChartSettingS57.prototype.displayTextMessage=false]
* @description 是否在海图上显示文本信息。
*/
this.displayTextMessage = false;
/**
* @member {boolean} [ChartSettingS57.prototype.displayTwoShades=false]
* @description 是否以两色模式显示水深面。
*/
this.displayTwoShades = false;
/**
* @member {string} [ChartSettingS57.prototype.displayTypeName="S52"]
* @description 海图显示类型名称,如"S52","IENC","INT"。
*/
this.displayTypeName = "S52";
/**
* @member {string} [ChartSettingS57.prototype.fontName="Arial"]
* @description 海图上显示文本的字体名称。
*/
this.fontName = "Arial";
/**
* @member {number} [ChartSettingS57.prototype.fontSize=10.0]
* @description 海图上显示文本的字体字号。
*/
this.fontSize = 10.0;
/**
* @member {boolean} [ChartSettingS57.prototype.localizationDisplayText=false]
* @description 是否对文本进行本地化显示。
*/
this.localizationDisplayText = false;
/**
* @member {boolean} [ChartSettingS57.prototype.minVisibleScaleEnabled=true]
* @description 物标最先可见比例尺是否有效。
*/
this.minVisibleScaleEnabled = true;
/**
* @member {boolean} [ChartSettingS57.prototype.simplifiedMarker=true]
* @description 是否使用简单海图符号。
*/
this.simplifiedMarker = true;
/**
* @member {boolean} [ChartSettingS57.prototype.symbolizedAreaBoundary=false]
* @description 是否使用符号化的区域边界。
*/
this.symbolizedAreaBoundary = false;
/**
* @member {boolean} [ChartSettingS57.prototype.textClipRegionEnabled=false]
* @description 是否启用海图图层的文本显示裁剪区。
*/
this.textClipRegionEnabled = false;
/**
* @member {object} [ChartSettingS57.prototype.displayableFeature=null]
* @description 物标类型是否可显示的对应关系。
*/
this.displayableFeature = null;
/**
* @member {object} [ChartSettingS57.prototype.selectableFeature=null]
* @description 物标类型是否可选择的对应关系。
*/
this.selectableFeature = null;
/**
* @member {boolean} [ChartSettingS57.prototype.displayBorder=false]
* @description 是否显示边框。
*/
this.displayBorder = false;
/**
* @member {boolean} [options.displayScaleFactor]
* @description 比例尺缩放。
*/
this.displayScaleFactor = 0.05;
/**
* @member {object} [ChartSettingS57.prototype.displayableAcronymClassify=null]
* @description 物标分组是否可显示的对应关系。
*/
this.displayableAcronymClassify = null;
/**
* @member {number} [options.safetyContour]
* @description 安全等深线。
*/
this.safetyContour = 30.0;
/**
* @member {number} [options.shallowContour]
* @description 浅水等深线。
*/
this.shallowContour = 2.0;
/**
* @member {number} [options.deepContour]
* @description 深水等深线。
*/
this.deepContour = 30.0;
/**
* @member {number} [options.safetyDepth]
* @description 安全水深值
*/
this.safetyDepth = 30.0;
if (options) {
Util.extend(this, options);
}
this.CLASS_NAME = "SuperMap.ChartSettingS57";
}
/**
* @function ChartSettingS57.prototype.destroy
* @description 释放资源,将引用资源的属性置空。
*/
destroy() {
super.destroy();
this.colourModeChart = null;
this.depthUnit = null;
this.displayCellName = null;
this.displayLowAccurateMarker = null;
this.displayMetaObject = null;
this.displayModeChart = null;
this.displayOtherContourLabel = null;
this.displaySafetyContourLabel = null;
this.displaySounding = null;
this.displayTextMessage = null;
this.displayTwoShades = null;
this.displayTypeName = null;
this.fontName = null;
this.fontSize = null;
this.localizationDisplayText = null;
this.minVisibleScaleEnabled = null;
this.simplifiedMarker = null;
this.symbolizedAreaBoundary = null;
this.textClipRegionEnabled = null;
this.displayableFeature = null;
this.selectableFeature = null;
this.displayBorder = null;
this.displayScaleFactor = null;
this.displayableAcronymClassify = null;
this.safetyContour = null;
this.shallowContour = null;
this.deepContour = null;
this.safetyDepth = null;
}
}