new ol.source.GeoFeature(name, opt_options)
Name | Type | Default | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string |
Name of the layer. |
|||||||||||||||||||||||||||||||||
opt_options |
Object |
parameters.
|
|||||||||||||||||||||||||||||||||
opt_option.state |
ol.source.State |
optional
Resource status. |
|||||||||||||||||||||||||||||||||
opt_options.style |
Object |
optional
Thematic map style. |
|||||||||||||||||||||||||||||||||
opt_options.styleGroups |
Object |
optional
Each theme type style group. |
|||||||||||||||||||||||||||||||||
opt_options.isHoverAble |
boolean | false |
optional
Whether to enable the hover event. |
||||||||||||||||||||||||||||||||
opt_options.highlightStyle |
Object |
optional
The style style that is triggered after the hover event is turned on. |
|||||||||||||||||||||||||||||||||
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>' |
optional
Copyright information. |
Extends
- Theme
Methods
-
addFeatures(features)
GeoFeature.js, line 62 -
Add features.
Name Type Description features
SuperMap.ServerFeature | GeoJSONObject | ol.Feature Features object.
-
clear()
GeoFeature.js, line 214 -
The contents of cleanup include data (features), thematic elements, and caching.
-
clearCache()
GeoFeature.js, line 205 -
Clear cache
-
createThematicFeature(feature)
GeoFeature.js, line 175 -
Create thematic feature.
Name Type Description feature
Object Feature object.
-
destroy()
GeoFeature.js, line 44 -
Disposes the resource. The property that references resource is set to null.
-
getCacheCount(){number}
GeoFeature.js, line 225 -
Get the count of current caches.
Returns:
Type Description number Return to the count of current caches. -
redrawThematicFeatures(extent)
GeoFeature.js, line 99 -
Redraw all thematic features.
Name Type Description extent
Object View range data.
-
removeAllFeatures()
GeoFeature.js, line 90 -
Clear all the vector elements on the current layer.
-
removeFeatures(features)
GeoFeature.js, line 80 -
Delete feature from the thematic diagram. This function removes all the vector elements that are passed in.
Name Type Description features
SuperMap.Feature.Vector The feature object to be deleted.
-
setMaxCacheCount(cacheCount)
GeoFeature.js, line 234 -
Set the maximum number of caching bars.
Name Type Description cacheCount
number Total count of caches.
-
setMaxCacheCount(featureID)
GeoFeature.js, line 246 -
Get all the graphics associated with feature through FeatureID. If this parameter is not passed in, the function returns all the graphs.
Name Type Description featureID
number feature ID.