22 * This program are made available under the terms of the Apache License, Version 2.0
33 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
44 import { Util } from '../commontypes/Util' ;
5- import { Unit , DisplayModeChart , ColourModeChart } from '../REST' ;
6-
75
86 /**
97 * @class ChartSetting
1210 * @classdesc 海图显示参数设置类,用于管理海图显示环境,包括海图的显示模式、显示类型名称、颜色模式、安全水深线等各种显示风格。更多内容介绍请参考[海图显示]{@link https://help.supermap.com/iDesktop/zh/tutorial/Chart/Visualization/ChartDisplaySetting}。
1311 * @version 11.2.0
1412 * @param {Object } options - 参数。
15- * @param {DisplayModeChart } [options.displayModeChart=DisplayModeChart.STANDARD] - 海图显示模式。
16- * @param {ColourModeChart } [options.colourModeChart=ColourModeChart.DAY_BRIGHT] - 海图显示的颜色模式。
17- * @param {string } [options.displayTypeName="S52"] - 海图显示类型的名称,如 "S52"、"IENC"、"INT"。
18- * @param {string } [options.fontName="Arial"] - 海图上显示文本的字体名称。
19- * @param {boolean } [options.simplifiedMarker=true] - 是否使用简单海图符号。
20- * @param {boolean } [options.symbolizedAreaBoundary=false] - 是否使用符号化的区域边界。
21- * @param {boolean } [options.displayTextMessage=false] - 是否在海图上显示文本信息。
22- * @param {boolean } [options.displaySounding=false] - 是否显示水深点。
23- * @param {boolean } [options.minVisibleScaleEnabled=true] - 物标的最小可见比例尺是否有效。
24- * @param {boolean } [options.localizationDisplayText=false] - 是否对文本进行本地化显示。
25- * @param {boolean } [options.displayMetaObject=false] - 是否显示元物标。
26- * @param {boolean } [options.displayCellName=false] - 是否显示图幅编号。
27- * @param {boolean } [options.displaySafetyContourLabel=true] - 是否显示安全等深线标注。
28- * @param {boolean } [options.displayBorder=false] - 是否显示图幅边框。
13+ * @param {string } [options.chartType] - 海图显示类型,S57、S100。
2914 * @param {number } [options.safetyContour=30.0] - 安全等深线。单位以 depthUnit 设置的水深单位为准。
3015 * @param {number } [options.shallowContour=2.0] - 浅水等深线。单位以 depthUnit 设置的水深单位为准。
3116 * @param {number } [options.deepContour=30.0] - 深水等深线。单位以 depthUnit 设置的水深单位为准。
3217 * @param {number } [options.safetyDepth=30.0] - 安全水深值。单位以 depthUnit 设置的水深单位为准。
33- * @param {boolean } [options.displayOtherContourLabel=false] - 是否显示其他等深线标注,即安全水深线标注以外的标注。
34- * @param {boolean } [options.displayTwoShades=false] - 是否以两色模式显示水深面。
35- * @param {Unit } [options.depthUnit=Unit.METER] - 显示水深单位。目前仅支持DECIMETER、METER、FOOT。
36- * @param {number } [options.fontSize=10.0] - 图上文本显示字体的字号。
37- * @param {object } [options.displayableFeature] - 当前地图下所有物标类型是否可显示的对应关系。
38- * @param {object } [options.selectableFeature] - 当前地图下所有物标类型是否可选择的对应关系。
39- * @param {boolean } [options.textClipRegionEnabled=false] - 是否启用海图图层的文本显示裁剪区。
40- * @param {boolean } [options.displayLowAccurateMarker=true] - 是否显示低精度符号。
41- * @param {number } [options.displayScaleFactor] - 比例尺缩放。
42- * @param {object } [options.displayableAcronymClassify] - 物标分组是否可显示的对应关系。
43- * @param {boolean } [options.wlaEnable] - 设置是否开启WLA(Water Level Adjustment),既使用地图中的S104分组中的数据集设置给S102数据更正水深显示。
44- * @param {boolean } [options.wlaDatetime] - 设置WLA(Water Level Adjustment)显示的时刻。时间格式为:yyyymmddThhmmssZ, 如20240224T000000Z,如果不符合格式则内部不解析
45- * @param {boolean } [options.s98InteroperableEnable] - 是否开启S98互操作。
46- * @param {number } [options.interoperabilityLevel=0] - 互操作级别,支持0,1。
4718 * @usage
4819 */
4920 export class ChartSetting {
5021
5122 constructor ( options ) {
5223 /**
53- * @member {DisplayModeChart} [options.displayModeChart]
54- * @description 海图显示模式。
55- */
56- this . displayModeChart = DisplayModeChart . STANDARD ;
57-
58- /**
59- * @member {ColourModeChart} [options.colourModeChart]
60- * @description 海图显示的颜色模式。
24+ * @member {string} [options.chartType]
25+ * @description 海图显示类型,S57、S100。
6126 */
62- this . colourModeChart = ColourModeChart . DAY_BRIGHT ;
27+ this . chartType = null ;
6328
6429 /**
65- * @member {string} [options.displayTypeName]
66- * @description 海图显示类型的名称,如 "S52"、"IENC"、"INT"。
67- */
68- this . displayTypeName = "S52" ;
69-
70- /**
71- * @member {string} [options.fontName]
72- * @description 海图上显示文本的字体名称。
73- */
74- this . fontName = "Arial" ;
75-
76- /**
77- * @member {boolean} [options.simplifiedMarker]
78- * @description 是否使用简单海图符号。
79- */
80- this . simplifiedMarker = true ;
81-
82- /**
83- * @member {boolean} [options.symbolizedAreaBoundary]
84- * @description 是否使用简单海图符号。
85- */
86- this . symbolizedAreaBoundary = false ;
87-
88- /**
89- * @member {boolean} [options.displayTextMessage]
90- * @description 是否在海图上显示文本信息。
91- */
92- this . displayTextMessage = false ;
93-
94- /**
95- * @member {boolean} [options.displaySounding]
96- * @description 是否显示水深点。
97- */
98- this . displaySounding = false ;
99-
100- /**
101- * @member {boolean} [options.minVisibleScaleEnabled]
102- * @description 物标的最小可见比例尺是否有效。
103- */
104- this . minVisibleScaleEnabled = true ;
105-
106- /**
107- * @member {boolean} [options.localizationDisplayText]
108- * @description 是否对文本进行本地化显示。
109- */
110- this . localizationDisplayText = false ;
111-
112- /**
113- * @member {boolean} [options.displayMetaObject]
114- * @description 是否显示元物标。
115- */
116- this . displayMetaObject = false ;
117-
118- /**
119- * @member {boolean} [options.displayCellName]
120- * @description 是否显图幅编号。
121- */
122- this . displayCellName = false ;
123-
124- /**
125- * @member {boolean} [options.displaySafetyContourLabel]
126- * @description 是否显示安全等深线标注。
127- */
128- this . displaySafetyContourLabel = false ;
129-
130- /**
131- * @member {boolean} [options.displayBorder]
132- * @description 是否显示图幅边框
30+ * @member {number} [options.safetyContour]
31+ * @description 安全等深线。单位以 depthUnit 设置的水深单位为准。
13332 */
134- this . displayBorder = false ;
33+ this . safetyContour = 30.0 ;
13534
13635 /**
13736 * @member {number} [options.safetyContour]
15756 */
15857 this . safetyDepth = 30.0 ;
15958
160- /**
161- * @member {boolean} [options.displayOtherContourLabel]
162- * @description 是否显示其他等深线标注,即安全水深线标注以外的标注。
163- */
164- this . displayOtherContourLabel = false ;
165-
166- /**
167- * @member {boolean} [options.displayTwoShades]
168- * @description 是否以两色模式显示水深面。
169- */
170- this . displayTwoShades = false ;
171-
172- /**
173- * @member {Unit} [options.depthUnit]
174- * @description 显示水深单位。
175- */
176- this . depthUnit = Unit . METER ;
177-
178- /**
179- * @member {number} [options.fontSize]
180- * @description 图上文本显示字体的字号。
181- */
182- this . fontSize = 10.0 ;
183-
184- /**
185- * @member {object} [options.displayableFeature]
186- * @description 当前地图下所有物标类型是否可显示的对应关系。
187- */
188- this . displayableFeature = null ;
189-
190- /**
191- * @member {object} [options.selectableFeature]
192- * @description 当前地图下所有物标类型是否可选择的对应关系。
193- */
194- this . selectableFeature = null ;
195-
196- /**
197- * @member {boolean} [options.textClipRegionEnabled]
198- * @description 是否启用海图图层的文本显示裁剪区。
199- */
200- this . textClipRegionEnabled = false ;
201-
202- /**
203- * @member {boolean} [options.displayLowAccurateMarker=true]
204- * @description 是否显示低精度符号。
205- */
206- this . displayLowAccurateMarker = true ;
207-
208- /**
209- * @member {boolean} [options.displayScaleFactor]
210- * @description 比例尺缩放。
211- */
212- this . displayScaleFactor = 0.05 ;
213-
214- /**
215- * @member {object} [options.displayableAcronymClassify]
216- * @description 物标分组是否可显示的对应关系。
217- */
218- this . displayableAcronymClassify = null ;
219-
220- /**
221- * @member {boolean} [options.wlaEnable]
222- * @description 是否开启WLA(Water Level Adjustment),既使用地图中的S104分组中的数据集设置给S102数据更正水深显示。
223- */
224- this . wlaEnable = false ;
225-
226- /**
227- * @member {string} [options.wlaDatetime]
228- * @description 设置WLA(Water Level Adjustment)显示的时刻。时间格式为:yyyymmddThhmmssZ, 如20240224T000000Z,如果不符合格式则内部不解析。
229- */
230- this . wlaDatetime = null ;
231-
232- /**
233- * @member {boolean} [options.s98InteroperableEnable]
234- * @description 是否开启S98互操作。
235- */
236- this . s98InteroperableEnable = false ;
237-
238- /**
239- * @member {number} [options.interoperabilityLevel]
240- * @description 互操作等级。
241- */
242- this . interoperabilityLevel = null ;
243-
24459 if ( options ) {
24560 Util . extend ( this , options ) ;
24661 }
25368 * @description 释放资源,将引用资源的属性置空。
25469 */
25570 destroy ( ) {
256- this . displayModeChart = null ;
257- this . colourModeChart = null ;
258- this . displayTypeName = null ;
259- this . fontName = null ;
260- this . simplifiedMarker = null ;
261- this . symbolizedAreaBoundary = null ;
262- this . displayTextMessage = null ;
263- this . displaySounding = null ;
264- this . minVisibleScaleEnabled = null ;
265- this . localizationDisplayText = null ;
266- this . displayMetaObject = null ;
267- this . displayCellName = null ;
268- this . displaySafetyContourLabel = null ;
269- this . displayBorder = null ;
71+ this . chartType = null ;
27072 this . safetyContour = null ;
27173 this . shallowContour = null ;
27274 this . deepContour = null ;
27375 this . safetyDepth = null ;
274- this . displayOtherContourLabel = null ;
275- this . displayTwoShades = null ;
276- this . depthUnit = null ;
277- this . fontSize = null ;
278- this . displayableFeature = null ;
279- this . selectableFeature = null ;
280- this . textClipRegionEnabled = null ;
281- this . displayLowAccurateMarker = null ;
282- this . displayScaleFactor = null ;
283- this . displayableAcronymClassify = null ;
284- this . s98InteroperableEnable = null ;
285- this . interoperabilityLevel = null ;
286- this . wlaEnable = null ;
287- this . wlaDatetime = null ;
28876 }
28977 }
29078
0 commit comments