new SuperMap.Feature.ShapeParameters.Image()
Extends
Members
-
clickableboolean
-
It is clickable or not.
-
dataInfoObject
-
The additional data with shape.
-
heightnumber
-
The drawn height, the default it the image height.
-
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.
-
imagestring Object
-
The address of the image.
-
isHoverByRefDataIDboolean
-
Whether to highlight in accordance with refDataID. It is used to highlight all geometries with the same refDataID.
-
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.
sHeightnumber
The height that is clipped from the image,the default is the height of the image
styleObject
The style object of the shape.Set style properties in subclasses.
sWidthnumber
The width that is clipped from the image,the default is the width of the image
sxnumber
The left upper corner abscissa clipped from the image
synumber
The left upper corner ordinate clipped from the image
widthnumber
The drawn width, the default is the image width.
xnumber
X of the upper left corner of the image.
ynumber
Y of the upper left corner of the image.
Methods
-
inherited Background(shapeFactory, box, setting){Object}
ShapeFactory.js, line 373 -
Create a shape object with rectangle background.
Name Type Description shapeFactory
SuperMap.Feature.ShapeFactory Shape factory object. Required.
box
Array.<number> Box area. It is an array of length 4, pixel coordinates, [left, bottom, right, top]. Required.
setting
Object Shape configure parameter. Required.
Name Type Default Description backgroundStyle
Object Background style whose object's available property: <SuperMap.Feature.ShapeParameters.Rectangle::style>.
backgroundRadius
Array [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, image, width, height, sx, sy, sWidth, sHeight){SuperMap.Feature.ShapeParameters.Image}
Image.js, line 13 -
Create a image parameter object.
Name Type Description x
number X of the upper left corner, required.
y
number Y of the upper left corner, required.
image
string | Object Image address or cavans object, required.
width
number The drawn width, the default is the image width.
height
number The drawn height, the default it the image height.
sx
number The left upper corner abscissa clipped from the image
sy
number The left upper corner ordinate clipped from the image
sWidth
number The width that is clipped from the image,the default is the width of the image.
sHeight
number The height that is clipped from the image,the default is the height of the image.
Returns:
Type Description SuperMap.Feature.ShapeParameters.Image Circular parameter object. -
inherited createShape(shapeParameters){Object}
ShapeFactory.js, line 66 -
Create a shape. The specific shape is determined by shapeParameters.
Name Type Description shapeParameters
Object 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()
Image.js, line 88 -
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 shapeFactory
SuperMap.Feature.ShapeFactory Shape factory object. Required.
dataViewBox
Array.<number> The data view box for the graph pattern. It is an array of length 4, pixel coordinates, [left, bottom, right, top]. Required.
setting
Object Shape configure parameter. Required.
Name Type Default Description axisStyle
Object The shape object in the s direction has 2 properties:
axisUseArrow
boolean false optional Whether the axis uses arrow. The default is false, which means not using arrow.
axisYTick
number 0 optional y axis tick. Default is 0 which means tick isn't used.
axisYLabels
Array.<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"].
axisYLabelsStyle
Object The label array style on the y axis. The style object's available property: <SuperMap.Feature.ShapeParameters.Label::style>.
axisYLabelsOffset
Array.<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;
axisXLabels
Array.<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.
axisXLabelsStyle
Object The label array style on the x axis. The style object's available property: <SuperMap.Feature.ShapeParameters.Label::style>.
axisXLabelsOffset
Array.<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;
useXReferenceLine
boolean 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.
xReferenceLineStyle
Object Horizontal reference line style style whose object's available property: <SuperMap.Feature.ShapeParameters.Line::style>.
axis3DParameter
number 0 optional 3D coordinate parameter. This property is available only when the value is greater than or equal to 15. The default is 0.
xShapeInfo
Object The shape object in the s direction has 2 properties:
Name Type Description xPositions
Array.<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.
width
number 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 defaultStyle
Object Default style. The style object available property is based on shape type reference <SuperMap.Feature.ShapeParameters> child object style property.
style
Object 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.
styleGroup
Array.<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.
styleByCodomain
Array.<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)
index
number styleGroup index, which is used to get the style from styleGroup.
value
number 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 style
Object user style.
Returns:
Type Description Object the style conforming to the levelRenderer.