Source: bemap-model/bemap-heatmapLayer.js

/**
 * BeNomad BeMap JavaScript API - HeatmapLayer class
 * MapLibre-exclusive: visualize point density with customizable heatmap layers.
 */

/**
 * @classdesc
 * Layer for heatmap visualization from point data. MapLibre only.
 * @public
 * @constructor
 * @extends {bemap.Layer}
 * @param {Object} options
 * @param {Array} options.points Array of {lon, lat, weight} objects.
 * @param {String} options.weightProperty Property name for weight (default: 'weight').
 * @param {Number} options.radius Heatmap radius in pixels (default: 20).
 * @param {Number} options.intensity Heatmap intensity (default: 1).
 * @param {Array} options.colors Array of color strings for gradient (default: blue→red).
 */
bemap.HeatmapLayer = function(options) {
  var opts = options || {};

  this.points = opts.points ? opts.points : [];
  this.weightProperty = opts.weightProperty ? opts.weightProperty : 'weight';
  this.radius = opts.radius ? opts.radius : 20;
  this.intensity = opts.intensity ? opts.intensity : 1;
  this.colors = opts.colors ? opts.colors : ['rgba(0,0,255,0)', 'royalblue', 'cyan', 'lime', 'yellow', 'red'];
  this.opacity = opts.opacity !== undefined ? opts.opacity : 0.8;

  bemap.Layer.call(this, options);
};
bemap.inherits(bemap.HeatmapLayer, bemap.Layer);