new OverlayGraphic(geometry, attributes)
Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/openlayers/iclient-ol.js"></script>
<script>
  new ol.Graphic(geometry, attributes);
  
</script>
// ES6 Import
import { OverlayGraphic } from '@supermapgis/iclient-ol';
new OverlayGraphic(geometry, attributes);
        
        
        
            openlayers/overlay/graphic/Graphic.js, line 9
        
        
    | Name | Type | Description | 
|---|---|---|
| geometry | ol.geom.Point | 几何对象。 | 
| attributes | Object | 可选 要素属性。 | 
Extends
Methods
- 
    static createStyleFunction(obj)openlayers/overlay/graphic/Graphic.js, line 135
- 
    
    新建样式函数。 Name Type Description objObject 对象参数。 
- 
    clone(){OverlayGraphic}openlayers/overlay/graphic/Graphic.js, line 32
- 
    
    克隆当前要素。 Returns:Type Description OverlayGraphic 克隆后的要素。 
- 
    destroy()openlayers/overlay/graphic/Graphic.js, line 164
- 
    
    清除参数值。 
- 
    getAttributes(){Object}openlayers/overlay/graphic/Graphic.js, line 91
- 
    
    获取要素属性。 Returns:Type Description Object 要素属性。 
- 
    getGeometry(){ol.geom.Point}openlayers/overlay/graphic/Graphic.js, line 64
- 
    
    获取当前要素几何信息。 Returns:Type Description ol.geom.Point 要素几何信息。 
- 
    getId(){string}openlayers/overlay/graphic/Graphic.js, line 46
- 
    
    获取当前 ID。 Returns:Type Description string ID。 
- 
    getStyle(){ol.style.Image}openlayers/overlay/graphic/Graphic.js, line 100
- 
    
    获取要素样式。 Returns:Type Description ol.style.Image ol.style.Image 子类样式对象。 
- 
    getStyleFunction(){function}openlayers/overlay/graphic/Graphic.js, line 126
- 
    
    获取样式函数。 Returns:Type Description function 样式函数。 
- 
    setAttributes(attributes)openlayers/overlay/graphic/Graphic.js, line 82
- 
    
    设置要素属性。 Name Type Description attributesObject 属性对象。 
- 
    setGeometry(geometry)openlayers/overlay/graphic/Graphic.js, line 73
- 
    
    设置当前要素几何信息。 Name Type Description geometryol.geom.Point 要素几何信息。 
- 
    setId(id)openlayers/overlay/graphic/Graphic.js, line 55
- 
    
    设置当前要素 ID。 Name Type Description idstring 要素 ID。 
- 
    setStyle(style)openlayers/overlay/graphic/Graphic.js, line 109
- 
    
    设置要素样式。 Name Type Description styleol.style.Image 样式,ol.style.Image 子类样式对象。