new ol.source.GeoFeature(name, opt_options)
openlayers/overlay/theme/GeoFeature.js, line 7
Name | Type | Default | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string |
图层名称。 |
|||||||||||||||||||||||||||||||||
opt_options |
Object |
参数。
|
|||||||||||||||||||||||||||||||||
opt_option.state |
ol/source/State |
可选
资源状态。 |
|||||||||||||||||||||||||||||||||
opt_options.style |
Object |
可选
专题图样式。 |
|||||||||||||||||||||||||||||||||
opt_options.styleGroups |
Object |
可选
各专题类型样式组。 |
|||||||||||||||||||||||||||||||||
opt_options.isHoverAble |
boolean | false |
可选
是否开启 hover 事件。 |
||||||||||||||||||||||||||||||||
opt_options.highlightStyle |
Object |
可选
开启 hover 事件后,触发的样式风格。 |
|||||||||||||||||||||||||||||||||
opt_option.attributions |
string | Object | 'Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>' |
可选
版权信息。 |
Extends
- Theme
Methods
-
addFeatures(features)
openlayers/overlay/theme/GeoFeature.js, line 64 -
添加要素。
Name Type Description features
SuperMap.ServerFeature | GeoJSONObject | ol/Feature 要素对象。
-
clear()
openlayers/overlay/theme/GeoFeature.js, line 216 -
清除的内容包括数据(features)、专题要素、缓存。
-
clearCache()
openlayers/overlay/theme/GeoFeature.js, line 207 -
清除缓存。
-
createThematicFeature(feature)
openlayers/overlay/theme/GeoFeature.js, line 177 -
创建专题要素。
Name Type Description feature
Object 要素对象。
-
destroy()
openlayers/overlay/theme/GeoFeature.js, line 46 -
释放资源,将引用资源的属性置空。
-
getCacheCount(){number}
openlayers/overlay/theme/GeoFeature.js, line 227 -
获取当前缓存数量。
Returns:
Type Description number 返回当前缓存数量。 -
redrawThematicFeatures(extent)
openlayers/overlay/theme/GeoFeature.js, line 101 -
重绘所有专题要素。
Name Type Description extent
Object 视图范围数据。
-
removeAllFeatures()
openlayers/overlay/theme/GeoFeature.js, line 92 -
清除当前图层所有的矢量要素。
-
removeFeatures(features)
openlayers/overlay/theme/GeoFeature.js, line 82 -
从专题图中删除 feature。这个函数删除所有传递进来的矢量要素。
Name Type Description features
SuperMap.Feature.Vector 要删除的要素对象。
-
setMaxCacheCount(cacheCount)
openlayers/overlay/theme/GeoFeature.js, line 236 -
设置最大缓存条数。
Name Type Description cacheCount
number 缓存总数。
-
setMaxCacheCount(featureID)
openlayers/overlay/theme/GeoFeature.js, line 248 -
通过 FeatureID 获取 feature 关联的所有图形。如果不传入此参数,函数将返回所有图形。
Name Type Description featureID
number 要素 ID。