new SuperMap.Feature.ShapeParameters.Point()
Extends
Members
-
clickableboolean
-
It is clickable or not.
-
dataInfoObject
-
The additional data with shape.
-
highlightStyleObject
-
The highlight style object can be set with the same style properties as the style's set style properties.
-
hoverableboolean
-
It is hoverable or not.
-
isHoverByRefDataIDboolean
-
Whether to highlight in accordance with refDataID. It is used to highlight all geometries with the same refDataID.
-
rnumber
-
The radius of the point. The default value is style.pointRadius.
-
refDataHoverGroupstring
-
The group name of highlight geometries. It is valid only when refDataID is valid and isHoverByRefDataID is true. Once the property is set and is valid, geometries associated with the same data and has the same property can be highlighted.
-
refDataIDstring
-
Data ID associated with shape.(<
SuperMap.Feature.Vector> ID)。 -
refOriginalPositionArray
-
Shape's reference original position, shape's reference center position. refOriginalPosition is an array, the first element represents x coordinate, and the second element represents y coordinate.
refOriginalPosition represents shape's reference center. In general, the origin of canvas is the reference position. But you can change the reference position by refOriginalPosition. e.g. refOriginalPosition = [80, 80], circle style.x = 20, style.y = 20, so the real position of the circle in canvas is [100, 100].
All position properties of shape is based on the reference center of refOriginalPosition. In other words, the position of shape in canvas is relative position on the basis of refOriginalPosition. Only when refOriginalPosition is [0, 0], the shape position is the absolute position of canvas.
The information of shape position has:style.pointList,style.x,style.y。
refOriginalPosition. The default value is [0, 0].
- Default Value: [0,0]
shapeParametersObject
Shape parameter object,<SuperMap.Feature.ShapeParameters> child class object. Optional.
styleObject
The style object of the shape.Set style properties in subclasses.
xnumber
x coordinate of the point.
ynumber
y coordinate of the point.
Methods
-
inherited Background(shapeFactory, box, setting){Object}
ShapeFactory.js, line 373 -
Create a shape object with rectangle background.
Name Type Description shapeFactorySuperMap.Feature.ShapeFactory Shape factory object. Required.
boxArray.<number> Box area. It is an array of length 4, pixel coordinates, [left, bottom, right, top]. Required.
settingObject Shape configure parameter. Required.
Name Type Default Description backgroundStyleObject Background style whose object's available property: <SuperMap.Feature.ShapeParameters.Rectangle::style>.
backgroundRadiusArray [0,0,0,0] optional The rectangular rounded corners of the background box can be defined by 4 radius: upper left, upper right, lower right, lower left, i.e., [r1, r2, r3, r4].The default backgroundRadius is [0, 0, 0, 0].
Returns:
Type Description Object Background box shape, which is a visible shape (rectangle) object. -
constructor(x, y){SuperMap.Feature.ShapeParameters.Point}
Point.js, line 15 -
Create a point parameter object.
Name Type Description xnumber x coordinate of the point. Required.
ynumber y coordinate of the point. Required.
Returns:
Type Description SuperMap.Feature.ShapeParameters.Point Point parameter object. -
inherited createShape(shapeParameters){Object}
ShapeFactory.js, line 66 -
Create a shape. The specific shape is determined by shapeParameters.
Name Type Description shapeParametersObject Shape parameter object,<
SuperMap.Feature.ShapeParameters> child class object. Optional. If using the parameter which isn't null, shapeParameters will be assigned to the parameter value, and then use shapeParameters to create a shape; If not using this parameter, the createShape method will directly use shapeParameter to create the shape.Returns:
Type Description Object Shape object (or null - failed to create the shape) -
destroy()
Point.js, line 47 -
Destroy objects.
-
inherited GraphAxis(shapeFactory, dataViewBox, setting, xShapeInfo){Array.<Object>}
ShapeFactory.js, line 411 -
Create a shape object array with graph axis.
Name Type Description shapeFactorySuperMap.Feature.ShapeFactory Shape factory object. Required.
dataViewBoxArray.<number> The data view box for the graph pattern. It is an array of length 4, pixel coordinates, [left, bottom, right, top]. Required.
settingObject Shape configure parameter. Required.
Name Type Default Description axisStyleObject The shape object in the s direction has 2 properties:
axisUseArrowboolean false optional Whether the axis uses arrow. The default is false, which means not using arrow.
axisYTicknumber 0 optional y axis tick. Default is 0 which means tick isn't used.
axisYLabelsArray.<string> The label array contents on the y axis. The label order is listed equally interval from top to down along the left data view box. e.g.:["1000", "750", "500", "250", "0"].
axisYLabelsStyleObject The label array style on the y axis. The style object's available property: <SuperMap.Feature.ShapeParameters.Label::style>.
axisYLabelsOffsetArray.<number> [0,0] optional The label array offset on the y axis. It is an array of 2 length. The first element is the horizontal offset for the y label array, positive to left, default is 0;
axisXLabelsArray.<string> The label array contents on the x axis. The label order is listed equally interval from top to down along the bottom data view box. e.g.:["92", "95", "99"]. the second element is the vertical offset for the y label array, positive to down, default is 0.
axisXLabelsStyleObject The label array style on the x axis. The style object's available property: <SuperMap.Feature.ShapeParameters.Label::style>.
axisXLabelsOffsetArray.<number> [0,0] optional The label array offset on the x axis. It is an array of 2 length. The first element is the horizontal offset for the x label array, positive to left, default is 0;
useXReferenceLineboolean Whether to use horizontal reference line. If ture, it is valid when axisYTick is greater than 0. The horizontal reference line is an extended line in the data view box along the y axis scale.
xReferenceLineStyleObject Horizontal reference line style style whose object's available property: <SuperMap.Feature.ShapeParameters.Line::style>.
axis3DParameternumber 0 optional 3D coordinate parameter. This property is available only when the value is greater than or equal to 15. The default is 0.
xShapeInfoObject The shape object in the s direction has 2 properties:
Name Type Description xPositionsArray.<number> Represent pixel coordinates in x direction. If the shape has certain width in the x direction, the center point for the x direction for the shape will be regarded as the x coordinate value.
widthnumber Represent the shape width (Note that the width of the point is always 0, it isn't a radius).
Returns:
Type Description Array.<Object> A shape object array with graph axis. -
inherited ShapeStyleTool(defaultStyle, style, styleGroup, styleByCodomain, index, value){Object}
ShapeFactory.js, line 756 -
A shape style tool. This tool helps to get the final merged style from the default style, common style, style by styleGroup and style by value.
Name Type Description defaultStyleObject Default style. The style object available property is based on shape type reference <SuperMap.Feature.ShapeParameters> child object style property.
styleObject Shape basic style. This parameter controls shape's basic style. The available property is based on shape type reference <SuperMap.Feature.ShapeParameters> child object style property. The priority is lower than styleGroup, styleByCodomain.
styleGroupArray.<Object> Each element of the array is style object whos available property is based on shape type reference <SuperMap.Feature.ShapeParameters> child object style property. Style is obtained from styleGroup via index.
styleByCodomainArray.<Object> Control data visible style according to the threshold range (parameter value). (start code) // styleByCodomain Each element is an object containing information and domain and range corresponding to the style information, the object has three properties (must): // start: range lower limit (included); // end: range upper limit (not included); // style: Data visualization graphics style, this style object can be set properties: <SuperMap.Feature.ShapeParameters.Polygon::style>. // dataStyleByCodomain array like: [ { start:0, end:250, style:{ fillColor:"#00CD00" } }, { start:250, end:500, style:{ fillColor:"#00EE00" } }, { start:500, end:750, style:{ fillColor:"#00FF7F" } }, { start:750, end:1500, style:{ fillColor:"#00FF00" } } ] (end)
indexnumber styleGroup index, which is used to get the style from styleGroup.
valuenumber Value, which is used to get the style from styleByCodomain.
Returns:
Type Description Object The style object after merged. -
inherited transformStyle(style){Object}
ShapeFactory.js, line 260 -
Transform the format of the user feature.style(the SVG style class) to the format standard (the CSS-Canvas class) of the levelRenderer
Name Type Description styleObject user style.
Returns:
Type Description Object the style conforming to the levelRenderer.
Type Definitions
-
SuperMap.Feature.ShapeParameters.Point.styleObject
-
Properties:
Name Type Description pointRadiusnumber Radius of the point, the default is 6 (pixel).
fillboolean Whether or not to fill, if you don't need to fill it, set it to false, the default value is true. If fill and stroke are false at the same time, the layers will be rendered by the default values of fill and stroke.
fillColorstring Sixteen decimal fill color. The default value is"#000000".
fillOpacitynumber fill opacity. The range is [0, 1], and the default value is 1.
strokeboolean Whether stroke, if you don't need to stroke it, set it to false, the default value is false. If fill and stroke are false at the same time, the layers will be rendered by the default values of fill and stroke.
strokeColorstring Sixteen decimal stroke color. The default value is "#000000".
strokeWidthnumber width of the line/width of the stroke, the default value is 1.
strokeOpacitynumber stroke opacity. The range is [0, 1], and the default value is 1.
shadowBlurnumber Shadow blur, (more than 0 is valid; default value is 0).
shadowColorstring Shadow color; The default value is '#000000'.
shadowOffsetXnumber Shadow X direction offset value; The default value is 0.
shadowOffsetYnumber hadow Y direction offset value; The default value is 0.