You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Documentation: added PropTypes for heatmap prop
This PR improves the documentation of the heatmap prop by adding types.
I don't mind adding PropTypes validation to this prop as well if you are interested in that.
* Update API.md
I added some spacing between the interface and the example snippet.
I also added a link to the example I wrote for the other repository. I think we should delay this PR until that example is live. That way, the new Demo link will go to live functioning code rather than no where.
Copy file name to clipboardExpand all lines: API.md
+18-2Lines changed: 18 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -347,9 +347,25 @@ For more details see the [google documentation](https://developers.google.com/ma
347
347
348
348
### Heatmap Layer
349
349
350
-
For enabling heatmap layer, just add `heatmapLibrary={true}` and provide data for heatmap in `heatmap` as props.
350
+
To use the heatmap layer, add `heatmapLibrary={true}` to add the visualizations library, and provide the data&configuration for the heatmap in `heatmap` as props.
351
+
352
+
The typescript interface for the heatmap prop is as follows:
353
+
```typescript
354
+
interfaceheatmapProp {
355
+
positions: {
356
+
lat:Number;
357
+
lng:Number;
358
+
weight?:Number;
359
+
}[];
360
+
options: {
361
+
radius?:number;
362
+
opacity?:number;
363
+
/* other options directly from Google Heatmaps API */
0 commit comments