new ol.source.HeatMap(name, options)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string |
The layer name. |
||||||||||||||||||||||||||||||||||||
options |
Object |
Construction parameters.
|
Extends
- ol.source.ImageCanvas
Methods
-
addFeatures(features)
HeatMap.js, line 96 -
Add heat point information.
Name Type Description features
GeoJSONObject | Array.<ol.Feature> | ol.Feature Feature array to add,support GeoJOSN object and ol.Feature object.
Example
var geojson = { "type": "FeatureCollection", "features": [ { "type": "feature", "geometry": { "type": "Point", //Only support point type "coordinates": [0, 0] }, "properties": { "height": Math.random()*9, } } ] }; var heatMapSource = new ol.source.HeatMap("heatMap",{"map": map}); heatMapSource.addFeatures(geojson); map.addLayer(new ol.layer.Image({ source: heatMapSource }));
-
getLocalXY(coordinate)
HeatMap.js, line 311 -
Get the coordinate system.
Name Type Description coordinate
Object Coordinate position.
-
removeFeatures(features)
HeatMap.js, line 366 -
Remove the specified heat point information.
Name Type Description features
Array.<SuperMap.Feature.Vector> An array of heat point information.
-
rotate(pixelP, rotation, center)
HeatMap.js, line 339 -
Get the pixel coordinates after a pixel coordinate point pixelP revolves the rotation arc in the center of the center counterclockwise.
Name Type Description pixelP
number Pixel coordinates point position.
rotation
number Angle of rotation.
center
number Center position.
-
scale(pixelP, center, scaleRatio){Array.<number>}
HeatMap.js, line 352 -
Get the pixel coordinates of a pixel coordinate point pixelP is scaleRatio times larger than the center.
Name Type Description pixelP
Object Pixel point.
center
Object Center position.
scaleRatio
number Scaling multiplier.
Returns:
Type Description Array.<number> Return array ratio. -
setOpacity(opacity)
HeatMap.js, line 128 -
Set the opacity of the layer, between values [0-1].
Name Type Description opacity
number opacity.
-
toiClientFeature(features){SuperMap.Feature.Vector}
HeatMap.js, line 408 -
Convert to the iClient features.
Name Type Description features
GeoJSONObject | Array.<ol.Feature> The pending features include the GeoJOSN specification data type, and the ol.feature type.
Returns:
Type Description SuperMap.Feature.Vector The converted iClient features.