当前位置: 代码迷 >> 综合 >> esri/symbols/SimpleMarkerSymbol 点符号
  详细解决方案

esri/symbols/SimpleMarkerSymbol 点符号

热度:28   发布时间:2024-01-09 05:08:39.0

AMD模块要求 ]

require ([ “esri / symbols / SimpleMarkerSymbol” ],function (SimpleMarkerSymbol ){ / * code goes here * / });   

描述

标记符号用于在图形图层上绘制点和多点。SimpleMarkerSymbol用于将点显示为简单形状,例如圆形。此外,符号可以有一个可选的轮廓,由线符号(SimpleLineSymbol)定义。

 

构造函数

 

名称 简述
new SimpleMarkerSymbol() 创建一个空的点符号对象(无样式)
new SimpleMarkerSymbol(style, size, outline, color) 通过参数创建一个点符号对象
new SimpleMarkerSymbol(json) 使用JSON创建一个点符号对象

常量

Name Description
STYLE_CIRCLE 圆符号
STYLE_CROSS The marker is a cross.
STYLE_DIAMOND The marker is a diamond.
STYLE_PATH The marker is a shape defined using an SVG Path string. See also the setPath method.
STYLE_SQUARE The marker is a square.
STYLE_X The marker is a diagonal cross.

 

属性

名称 类型 简述
angle Number The angle of the marker.
color Color Symbol color.
outline SimpleLineSymbol Outline of the marker.
size Number Size of the marker in pixels.
style String The marker style.
type String The type of symbol.
xoffset Number The offset on the x-axis in pixels.
yoffset Number The offset on the y-axis in pixels.

 

方法

Name Return type Summary
setAngle(angle) MarkerSymbol Rotates the symbol clockwise around its center by the specified angle.
setColor(color) Symbol Sets the symbol color.
setOffset(x, y) MarkerSymbol Sets the x and y offset of a marker in screen units.
setOutline(outline) SimpleMarkerSymbol Sets the outline of the marker symbol.
setPath(path) SimpleMarkerSymbol Sets the marker shape to the given path string and switches the marker style to STYLE_PATH.
setSize(size) MarkerSymbol Sets the size of a marker in pixels.
setStyle(style) SimpleMarkerSymbol Sets the marker symbol style.
toJson() Object Converts object to its ArcGIS Server JSON representation.

 

构造函数详细信息

 

require(["esri/symbols/SimpleMarkerSymbol", ... 
], function(SimpleMarkerSymbol, ... ) {var sms = new SimpleMarkerSymbol();...
});

 

  相关解决方案