Class: DefaultStyle

DefaultStyle

缺省属性类。
用户可以通过该类设置缺省标绘属性,包括线型、线色、线宽等属性。启用缺省属性后,标号将以缺省属性为默认风格去绘制。

new DefaultStyle(options)

Usage
// 浏览器
<script type="text/javascript" src="../../web/libs/plotting/leaflet/11.3.0/iclient-plot-leaflet-es6.min.js"></script>
<script>
  new SuperMap.Plot.DefaultStyle(options);
  
  
</script>

// ES6 Import
import { DefaultStyle } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';

new DefaultStyle(options);

common/plot/DefaultStyle.js, line 2
Name Type Description
options Object

标号的缺省属性。

Name Type Default Description
lineColor string null 可选

线色。

lineWidth number null 可选

线宽。

lineType number 可选

线型。

lineOpacity number null 可选

线透明度。

lineCap string null 可选

线连接拐点处理。

flagTextSize number null 可选

生成旗面文字的字号。

maxScale number null 可选

标号最大缩放比例。

minScale number null 可选

标号最小缩放比例。

dotSymbolSize number 可选

标号大小。

dotTextSpace number null 可选

标号与注记之间的距离。

scaleByMap boolean null 可选

标号随图缩放。

fillSymbolID number null 可选

填充方式。

fillColor string null 可选

填充色。

fillOpacity number null 可选

填充透明度。

fontColor string null 可选

字体颜色。

fontOpacity number null 可选

字体透明度。

fontStroke boolean null 可选

字体描边是否启用。

fontStrokeColor string null 可选

字体描边颜色。

fontStrokeWidth string null 可选

字体描边宽度。

fontBackground boolean null 可选

字体背景是否启用。

fontBackgroundColor string null 可选

字体背景色。

fontShadow boolean null 可选

字体阴影是否启用。

fontShadowColor string null 可选

字体阴影颜色。

fontShadowOffsetX number null 可选

字体阴影偏移X。

fontShadowOffsetY number null 可选

字体阴影偏移Y。

fontSize number null 可选

字体大小。

fontSpace number null 可选

字间距。

fontPercent number null 可选

字宽百分比。

fontFamily string null 可选

字体类型。

fontWeight string null 可选

字体粗细。

fontStyle string 可选

字体样式。可设值:"normal","italic","oblique"。

defaultFlag boolean 可选

是否使用标号缺省属性。

Members

defaultFlagboolean

是否使用标号缺省属性。

dotSymbolSizenumber

标号大小,单位:pixel。

dotTextSpacenumber

标号与注记之间的距离,单位:pixel。

fillAnglenumber

渐变填充角度。

fillBackColorstring

填充背景色。

fillBackOpacitynumber

填充背景透明度。

fillCenterOffsetXnumber

渐变填充水平偏移。

fillCenterOffsetYnumber

渐变填充竖直偏移。

fillColorstring

填充色。

fillGradientModestring

渐变填充样式。

fillOpacitynumber

填充透明度,范围为:0-1。

fillSymbolIDnumber

填充样式。

flagTextSizenumber

生成旗面文字的字号。

fontBackgroundboolean

字体背景是否启用。

fontBackgroundColorstring

字体背景色。

fontColorstring

字体颜色。

fontFamilystring

字体类型。

fontOpacitynumber

字体透明度,范围为:0-1。

fontPercentnumber

字宽百分比。

fontShadowboolean

字体阴影是否启用。

fontShadowColorstring

字体阴影颜色。

fontShadowOffsetXnumber

字体阴影偏移X。

fontShadowOffsetYnumber

字体阴影偏移Y。

fontSizenumber

字体大小。

fontSpacenumber

字间距。

fontStrokeboolean

字体描边是否启用。

fontStrokeColorstring

字体描边颜色。

fontStrokeWidthstring

字体描边宽度。

fontStylestring

字体样式。

fontStylestring

字体样式。

fontWeightstring

字体粗细,可设值:"normal", "bold", "bolder", "lighter"。

lineCapstring

线连接拐点处理,可设值:"butt","round","square"。

lineColorstring

线色。

lineOpacitynumber

线透明度,范围为:0-1。

lineTypenumber

线型,可设值:0:实线,1:长虚线,2:由点构成的直线,3:由线划线段组成的直线,4:由重复的线划点图案构成的直线。

lineWidthnumber

线宽。

maxScalenumber

标号最大缩放比例。

minScalenumber

标号最小缩放比例。

scaleByMapboolean

标号随图缩放。

surroundLineColorstring

衬线颜色。

surroundLineColorOpacitynumber

衬线透明度。

surroundLineTypenumber

衬线类型。

surroundLineWidthnumber

衬线线宽。

Methods

destroy()

common/plot/DefaultStyle.js, line 499

销毁该类,释放相关资源。

resetNull()

common/plot/DefaultStyle.js, line 540

缺省属性全部置空。