new ol.source.HeatMap(name, options)
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string |
The layer name. |
||||||||||||||||||||||||||||||||||||
options |
Object |
Construction parameters.
|
Extends
Methods
-
addFeatures(features)
HeatMap.js, line 96 -
Add heat point information.
Name Type Description featuresGeoJSONObject | 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 coordinateObject Coordinate position.
-
removeFeatures(features)
HeatMap.js, line 366 -
Remove the specified heat point information.
Name Type Description featuresArray.<ol.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 pixelPnumber Pixel coordinates point position.
rotationnumber Angle of rotation.
centernumber 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 pixelPObject Pixel point.
centerObject Center position.
scaleRationumber 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 opacitynumber opacity.
-
toiClientFeature(features){ol.supermap.Feature.Vector}
HeatMap.js, line 408 -
Convert to the iClient features.
Name Type Description featuresGeoJSONObject | Array.<ol.Feature> The pending features include the GeoJOSN specification data type, and the ol.feature type.
Returns:
Type Description ol.supermap.Feature.Vector The converted iClient features.