1import { ExpoLinearGradient } from 'expo-module-scripts'; 2import React from 'react'; 3 4import { PointWithData } from './Common.types'; 5 6/** 7 * Props of Heatmap component of Expo Maps library. 8 */ 9export type HeatmapProps = { 10 points: PointWithData[]; 11} & HeatmapOptions; 12 13/** 14 * Configuration options for the heatmap. 15 */ 16export type HeatmapOptions = { 17 /** 18 * The radius of Gaussian blur applied to the points in pixels (optional). 19 * @default 20 20 */ 21 radius?: number; 22 /** 23 * Defines the color theme of the heatmap (optianal). 24 * 25 * Color locations will correspond to colors for particular values on the heatmap scaled between 0 and 1. 26 * 27 * @default provider default 28 */ 29 gradient?: ExpoLinearGradient; 30 /** 31 * Opacity of the heatmap (optional). 32 * @default 1 33 */ 34 opacity?: number; 35}; 36 37/** 38 * Internal JSON object for representing marker clusters in Expo Maps library. 39 * 40 * See {@link ClusterProps} for more detail. 41 */ 42export type HeatmapObject = { 43 type: 'heatmap'; 44 points: PointWithData[]; 45 radius?: number; 46 opacity?: number; 47} & HeatmapProps; 48 49/** 50 * Heatmap component of Expo Maps library. 51 * 52 * Displays multiple {@link PointWithData} objects as a heatmap. 53 * Providing data with each point is optional; if no data is provided, 54 * heatmap will represent density of points on the map. 55 * 56 * This component should be ExpoMap component child to work properly. 57 * 58 * See {@link HeatmapProps} to learn more about props. 59 */ 60export class Heatmap extends React.Component<HeatmapProps> { 61 render() { 62 return null; 63 } 64} 65