要素类组合了地理和属性,Graphic 类同时具有 style、attributes和geometry 属性。
| SuperMap. |
要素类组合了地理和属性,Graphic 类同时具有 style、attributes和geometry 属性。 |
| Properties | |
| attributes | {Object} 描述要素的任意的可序列化属性。 |
| geometry | {SuperMap.Geometry.Point} 该属性用于存放几何信息。 |
| style | {SuperMap.Style} 要素的样式属性,目前支持<SuperMap.Style.Circle>和<SuperMap.Style.RegularShape>。 |
| Constructor | |
| SuperMap. |
实例化矢量要素。 |
{SuperMap.Geometry.Point} 该属性用于存放几何信息。
{SuperMap.Style} 要素的样式属性,目前支持<SuperMap.Style.Circle>和<SuperMap.Style.RegularShape>。
实例化矢量要素。
var geometry = new SuperMap.Geometry.Point(-115,10);
var style = {
image: new SuperMap.Style.Circle({
opacity: 1.0,
scale: 1.0,
radius: 6,
fill: new SuperMap.Style.Fill({
color: "rgba(238, 153, 0, 0.4)"
}),
stroke: new SuperMap.Style.Stroke({
color: "rgba(238,153,0,1)",
width: 1
})
})
}
var pointGraphic = new SuperMap.Graphic(geometry,null,style);
graphicLayer.addGraphics(pointGraphic);
| geometry | {SuperMap.Geometry.Point} 代表要素的几何点要素。 |
| attributes | {Object} 描述要素的任意的可序列化属性,将要映射到 attributes 属性中的可选对象。 |
| style | {Object} 一个可选的样式对象。 |